mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
qc_stream_buf_alloc() can fail for two reasons : * limit of Tx buffer per connection reached * allocation failure The first case is properly treated. A flag QC_CF_CONN_FULL is set on the connection to interrupt emission. It is cleared when a buffer became available after in order ACK reception and the MUX tasklet is woken up. The allocation failure was handled with the same mechanism which in this case is not appropriate and could lead to a connection transfer freeze. Instead, prefer to close the connection with a QUIC internal error code. To differentiate the two causes, qc_stream_buf_alloc() API was changed to return the number of available buffers to the caller. This must be backported up to 2.6.
24 lines
844 B
C
24 lines
844 B
C
#ifndef _HAPROXY_QUIC_STREAM_H_
|
|
#define _HAPROXY_QUIC_STREAM_H_
|
|
|
|
#ifdef USE_QUIC
|
|
|
|
#include <haproxy/mux_quic-t.h>
|
|
#include <haproxy/quic_stream-t.h>
|
|
|
|
struct quic_conn;
|
|
|
|
struct qc_stream_desc *qc_stream_desc_new(uint64_t id, enum qcs_type, void *ctx,
|
|
struct quic_conn *qc);
|
|
void qc_stream_desc_release(struct qc_stream_desc *stream);
|
|
int qc_stream_desc_ack(struct qc_stream_desc **stream, size_t offset, size_t len);
|
|
void qc_stream_desc_free(struct qc_stream_desc *stream, int closing);
|
|
|
|
struct buffer *qc_stream_buf_get(struct qc_stream_desc *stream);
|
|
struct buffer *qc_stream_buf_alloc(struct qc_stream_desc *stream,
|
|
uint64_t offset, int *avail);
|
|
void qc_stream_buf_release(struct qc_stream_desc *stream);
|
|
|
|
#endif /* USE_QUIC */
|
|
#endif /* _HAPROXY_QUIC_STREAM_H_ */
|