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.
}
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,