From 76fc07e9a06a50d01506fcf35be15e753fd4f90f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 21 Mar 2022 16:12:19 +0100 Subject: [PATCH] BUG/MINOR: quic: Wrong TX packet related counters handling During the packet number space discarding, do no reset tx.in_flight counter before decrement it from other variables. Furthermore path prep_in_flight counter was not decremented. --- include/haproxy/xprt_quic.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/haproxy/xprt_quic.h b/include/haproxy/xprt_quic.h index 3135ce5fc8..3348d82cf6 100644 --- a/include/haproxy/xprt_quic.h +++ b/include/haproxy/xprt_quic.h @@ -1029,12 +1029,14 @@ static inline void quic_pktns_discard(struct quic_pktns *pktns, { struct eb64_node *node; + qc->path->in_flight -= pktns->tx.in_flight; + qc->path->prep_in_flight -= pktns->tx.in_flight; + qc->path->loss.pto_count = 0; + pktns->tx.time_of_last_eliciting = 0; pktns->tx.loss_time = TICK_ETERNITY; pktns->tx.pto_probe = 0; pktns->tx.in_flight = 0; - qc->path->loss.pto_count = 0; - qc->path->in_flight -= pktns->tx.in_flight; node = eb64_first(&pktns->tx.pkts); while (node) { -- 2.47.3