]> git.kaiwu.me - haproxy.git/commit
MAJOR: mux_quic: support stream elasticity during connection lifetime
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 15 May 2026 14:56:00 +0000 (16:56 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 20 May 2026 07:52:50 +0000 (09:52 +0200)
commite139dd90e328bcc6b085570f8ba58683e38a7f90
treea40f01d4bdfcc9b197a6cc61f85f9e879a8c19a1
parent89f3975acc57680518dcac65c697d4fef4d4e196
MAJOR: mux_quic: support stream elasticity during connection lifetime

qcc_release_remote_stream() is called each time a remote stream is
closed. Flow control accounting is updated and when necessary, a
MAX_STREAMS_BIDI frame is prepared to allow the peer to initiate new
streams.

This patch extends stream elasticity features with the QUIC bidirection
stream flow control mechanism. The announced value can now be possibly
reduced depending on conn_calc_max_streams().

The first step is to decrement closed streams from the global committed
extra streams total. This must be performed conn_calc_max_streams() to
ensure the calculation will be valid.

Then, there is two cases depending on conn_calc_max_streams() result. If
the value is less than the peer still remaining stream window, nothing
more is performed. If the opposite case, flow control must be increased
and a MAX_STREAMS_BIDI frame is prepared, with the value adjusted to not
exceed the stream elasticity limit. Global extra streams total is then
finally incremented.

This calcul also ensures that when all streams are closed, global extra
streams accounting operations are decremented by 1, as a connection
always has access to one stream which is excluded from the global total.

Note that if stream elasticity is not active, flow control increases
principle is unchanged and remains statically performed.

This patch is labelled as major as it complexifies bidirectional stream
flow control mechanisme. This is a sensitive operation as there is a
risk of connection freeze if flow control updates are inadvertently
skipped.
doc/configuration.txt
src/mux_quic.c