]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MAJOR: mux-quic: increase stream flow-control for multi-buffer alloc
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 4 Mar 2025 14:25:44 +0000 (15:25 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 7 Mar 2025 11:06:27 +0000 (12:06 +0100)
Support for multiple Rx buffers per QCS instance has been introduced by
previous patches. However, due to flow-control initial values, client
were still unable to fully used this to increase their upload
throughput.

This patch increases max-stream-data-bidi-remote flow-control initial
values. A new define QMUX_STREAM_RX_BUF_FACTOR will fix the number of
concurrent buffers allocable per QCS. It is set to 90.

Note that connection flow-control initial value did not changed. It is
still configured to be equivalent to bufsize multiplied by the maximum
concurrent streams. This ensures that Rx buffers allocation is still
constrained per connection, so that it won't be possible to have all
active QCS instances using in parallel their maximum Rx buffers count.

include/haproxy/mux_quic.h
src/quic_tp.c

index a2a1ecfb8fecfe8aa88220eabaa9b03b4ff6864a..b39fdfd9c615f2208a494b7789e6dde55b228352 100644 (file)
@@ -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
index 320e987834ebd2cfc511adad114d52e6eceb7908..e82e2e8bb087fa68b0901109c04e335d5539426d 100644 (file)
@@ -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;