]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: refactor handling of streams after MUX release
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 May 2025 09:39:20 +0000 (11:39 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 May 2025 12:26:45 +0000 (14:26 +0200)
commitf286288471929c8d7e5e4a94fb0fac7115883c59
tree58fee288add8a7763164d90a57be064f9abffd74
parent07d41a043cf7d7ff8dcba8445f4224ab0d6aeef4
MINOR: quic: refactor handling of streams after MUX release

quic-conn layer has to handle itself STREAM frames after MUX release. If
the stream was already seen, it is probably only a retransmitted frame
which can be safely ignored. For other streams, an active closure may be
needed.

Thus it's necessary that quic-conn layer knows the highest stream ID
already handled by the MUX after its release. Previously, this was done
via <nb_streams> member array in quic-conn structure.

Refactor this by replacing <nb_streams> by two members called
<stream_max_uni>/<stream_max_bidi>. Indeed, it is unnecessary for
quic-conn layer to monitor locally opened uni streams, as the peer
cannot by definition emit a STREAM frame on it. Also, bidirectional
streams are always opened by the remote side.

Previously, <nb_streams> were set by quic-stream layer. Now,
<stream_max_uni>/<stream_max_bidi> members are only set one time, just
prior to QUIC MUX release. This is sufficient as quic-conn do not use
them if the MUX is available.

Note that previously, IDs were used relatively to their type, thus
incremented by 1, after shifting the original value. For simplification,
use the plain stream ID, which is incremented by 4.
include/haproxy/mux_quic-t.h
include/haproxy/mux_quic.h
include/haproxy/quic_conn-t.h
src/mux_quic.c
src/quic_conn.c
src/quic_rx.c
src/quic_stream.c