]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: update drs->lost before calling on_ack_recv
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 28 May 2026 15:41:30 +0000 (17:41 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 28 May 2026 15:47:31 +0000 (17:47 +0200)
commit6599dd7d41208ea1f5a8479210085b678c736b44
treec87e4f6a24e351f0f48ed7e51826da1b82cec120
parent45ad1037d038f4dbabb0a159e68421a183d482d9
BUG/MINOR: quic: update drs->lost before calling on_ack_recv

The QUIC congestion control algorithm impacted by this bug is BBR.

In qc_notify_cc_of_newly_acked_pkts(), drs->lost was updated after
quic_cc_drs_on_ack_recv(), causing the current sample's lost count to
miss the bytes_lost from the current loss detection round. This meant
that rs->lost = drs->lost - rs->prior_lost would always be 0 for the
current losses, since both drs->lost and rs->prior_lost (captured at
packet send time) excluded the current bytes_lost.

Moving drs->lost += bytes_lost before on_ack_recv ensures that the
rate sample correctly includes the newly detected lost bytes, matching
the BBR algorithm's intent where C.delta_lost = C.lost - C.prior_lost
should reflect all losses since the last sample.

Must be backported as far as 3.1 where delivery rate sampling was
implemented.
src/quic_rx.c