BUG/MINOR: quic: ensure cwnd limits are always enforced
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 20 Jan 2025 15:24:21 +0000 (16:24 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 May 2025 14:27:14 +0000 (16:27 +0200)
commit355a3225302d1714792781f2dbee7d2ccfdc2a62
tree66a25a7f1b5daae081affbf8fcbc382e3fbe726c
parent0122364f119fe16dfecb3bbdd8e3f7ed51ea3885
BUG/MINOR: quic: ensure cwnd limits are always enforced

Congestion window is limit by a minimal and maximum values which can
never be exceeded. Min value is hardcoded to 2 datagrams as recommended
by the specification. Max value is specified via haproxy configuration.

These values must be respected each time the congestion window size is
adjusted. However, in some rare occasions, limit were not always
enforced. Fix this by implementing wrappers to set or increment the
congestion window. These functions ensure limits are always applied
after the operation.

Additionnally, wrappers also ensure that if window reached a new maximum
value, it is saved in <cwnd_last_max> field.

This should be backported up to 2.6, after a brief period of
observation.

(cherry picked from commit 7bad88c35c7547d52ac170ed9f89f29cccd6c46c)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
include/haproxy/quic_cc.h
src/quic_cc.c
src/quic_cc_bbr.c
src/quic_cc_cubic.c
src/quic_cc_newreno.c