]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: ignore uni-stream for initial max data TP
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 20 Mar 2025 15:18:13 +0000 (16:18 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 25 Mar 2025 15:29:38 +0000 (16:29 +0100)
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.

src/quic_tp.c

index 0584cc11fc73f0b154687a809bc317a850a2a71c..85d8fc9fcaffc3f1e7ab136009f182e2dcb52a20 100644 (file)
@@ -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;