]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-quic: limit stream flow control on snd_buf
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 18 Oct 2023 13:55:38 +0000 (15:55 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 31 Jan 2024 15:28:54 +0000 (16:28 +0100)
commitc44692356d298b8ccc9b126f23897c9643ad796e
tree4fe93499fb3212e29d269b331c4d67a81095fb5c
parent25493ca036a433460c2c0da04a3997e42243bf82
MEDIUM: mux-quic: limit stream flow control on snd_buf

This patch is the first of two to reimplement flow control emission
limits check. The objective is to account flow control earlier during
snd_buf stream callback. This should smooth transfers and prevent over
buffering on haproxy side if flow control limit is reached.

The current patch deals with stream level flow control. It reuses the
newly defined flow control type. Soft offset is incremented after HTX to
data conversion. If limit is reached, snd_buf is interrupted and stream
layer will subscribe on QCS.

On qcc_io_cb(), generation of STREAM frames is restricted as previously
to ensure to never surpass peer limits. Finally, flow control real
offset is incremented on lower layer send notification. Thus, it will
serve as a base offset for built STREAM frames. If limit is reached,
STREAM frames generation is suspended.

Each time QCS data flow control limit is reached, soft and real offsets
are reconsidered.

Finally, special care is used when flow control limit is incremented via
MAX_STREAM_DATA reception. If soft value is unblocked, stream layer
snd_buf is woken up. If real value is unblocked, qcc_io_cb() is
rescheduled.
include/haproxy/mux_quic-t.h
src/h3.c
src/mux_quic.c
src/qmux_trace.c