From: Amaury Denoyelle Date: Thu, 20 Mar 2025 15:18:13 +0000 (+0100) Subject: MINOR: quic: ignore uni-stream for initial max data TP X-Git-Tag: v3.2-dev9~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f1a18e318c276dd6e779f227d83709cb8e0664d;p=thirdparty%2Fhaproxy.git MINOR: quic: ignore uni-stream for initial max data TP Initial TP value for max-data is automatically calculated to be adjusted to the maximum number of opened streams over a QUIC connection. This took into account both max-streams-bidi-remote and uni-streams. By default, this is equivalent to 100 + 3 = 103 max opened streams. This patch simplifies the calculation by only using bidirectional streams. Uni streams are ignored because they are only used for HTTP/3 control exchanges, which should only represents a few bytes. For now, users can only configure the max number of remote bidi streams, so the simplified calculation should make more sense to them. Note that this relies on the assumption that HTTP/3 is used as application protocol. To support other protocols, it may be necessary to review this and take into account both local bidi and uni streams. --- diff --git a/src/quic_tp.c b/src/quic_tp.c index 0584cc11f..85d8fc9fc 100644 --- a/src/quic_tp.c +++ b/src/quic_tp.c @@ -70,7 +70,7 @@ void quic_transport_params_init(struct quic_transport_params *p, int server) /* Set connection flow-control data limit, automatically calculated * from max number of concurrently opened streams. */ - p->initial_max_data = (max_streams_bidi + max_streams_uni) * stream_rx_bufsz; + p->initial_max_data = max_streams_bidi * stream_rx_bufsz; /* Set remote streams flow-control data limit. */ p->initial_max_stream_data_bidi_remote = stream_rx_bufsz * QMUX_STREAM_RX_BUF_FACTOR;