diff --git a/include/haproxy/mux_quic.h b/include/haproxy/mux_quic.h index a2a1ecfb8..b39fdfd9c 100644 --- a/include/haproxy/mux_quic.h +++ b/include/haproxy/mux_quic.h @@ -51,6 +51,9 @@ static inline int qmux_stream_rx_bufsz(void) return global.tune.bufsize - NCB_RESERVED_SZ; } +/* Number of buffers usable on Rx per QCS instance. */ +#define QMUX_STREAM_RX_BUF_FACTOR 90 + /* Bit shift to get the stream sub ID for internal use which is obtained * shifting the stream IDs by this value, knowing that the * QCS_ID_TYPE_SHIFT less significant bits identify the stream ID diff --git a/src/quic_tp.c b/src/quic_tp.c index 320e98783..e82e2e8bb 100644 --- a/src/quic_tp.c +++ b/src/quic_tp.c @@ -65,7 +65,7 @@ void quic_transport_params_init(struct quic_transport_params *p, int server) p->initial_max_streams_bidi = max_streams_bidi; p->initial_max_streams_uni = max_streams_uni; p->initial_max_stream_data_bidi_local = stream_rx_bufsz; - p->initial_max_stream_data_bidi_remote = stream_rx_bufsz; + p->initial_max_stream_data_bidi_remote = stream_rx_bufsz * QMUX_STREAM_RX_BUF_FACTOR; p->initial_max_stream_data_uni = stream_rx_bufsz; p->initial_max_data = (max_streams_bidi + max_streams_uni) * stream_rx_bufsz;