From f010f0aaf29fe6a280734d2ebe8eeabe5de3af96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 6 Jan 2022 17:28:05 +0100 Subject: [PATCH] MINOR: quic: Missing retransmission from qc_prep_fast_retrans() In fact we must look for the first packet with some ack-elicting frame to in the packet number space tree to retransmit from. Obviously there may be already retransmit packets which are not deemed as lost and still present in the packet number space tree for TX packets. --- src/xprt_quic.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index ca21b1f37..f1adc19a8 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -2189,12 +2189,20 @@ static void qc_prep_fast_retrans(struct quic_enc_level *qel, struct quic_frame *frm, *frmbak; start: + pkt = NULL; pkts = &qel->pktns->tx.pkts; node = eb64_first(pkts); - if (!node) + /* Skip the empty packet (they have already been retransmitted) */ + while (node) { + pkt = eb64_entry(&node->node, struct quic_tx_packet, pn_node); + if (!LIST_ISEMPTY(&pkt->frms)) + break; + node = eb64_next(node); + } + + if (!pkt) return; - pkt = eb64_entry(&node->node, struct quic_tx_packet, pn_node); list_for_each_entry_safe(frm, frmbak, &pkt->frms, list) qc_treat_nacked_tx_frm(qc, frm, qel->pktns); if (qel == &qc->els[QUIC_TLS_ENC_LEVEL_INITIAL] &&