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)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 2 Jun 2025 15:31:52 +0000 (17:31 +0200)
commit783eb780f3fcb9489453ce4200f65702a8c9e195
treea86f5c011d8b1f6d2fe5c13d0ac80d3d12aebb2e
parent2f13b9061bf5ed8d8084e7b4049b6492e13d27c7
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>
(cherry picked from commit 355a3225302d1714792781f2dbee7d2ccfdc2a62)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
include/haproxy/quic_cc.h
src/quic_cc.c
src/quic_cc_cubic.c
src/quic_cc_newreno.c