mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04:00
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.
This commit is contained in:
parent
45ad1037d0
commit
6599dd7d41
1 changed files with 1 additions and 1 deletions
|
|
@ -468,8 +468,8 @@ static void qc_notify_cc_of_newly_acked_pkts(struct quic_conn *qc,
|
|||
}
|
||||
|
||||
if (drs) {
|
||||
quic_cc_drs_on_ack_recv(drs, p, pkt_delivered);
|
||||
drs->lost += bytes_lost;
|
||||
quic_cc_drs_on_ack_recv(drs, p, pkt_delivered);
|
||||
}
|
||||
if (p->cc.algo->on_ack_rcvd)
|
||||
p->cc.algo->on_ack_rcvd(&p->cc, bytes_delivered, pkt_delivered,
|
||||
|
|
|
|||
Loading…
Reference in a new issue