From dc591cd6cb8cf5c0e07f720858a1f9ea62be844e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 21 Jul 2022 14:24:41 +0200 Subject: [PATCH] MINOR: quic: Stop looking for packet loss asap As the TX packets are ordered by their packet number and always sent in the same order. their TX timestamps are inspected from the older to the newer values when we look for the packet loss. So we can stop this search as soon as we found the first packet which has not been lost. Must be backported to 2.6 --- src/quic_loss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quic_loss.c b/src/quic_loss.c index 7cce3a478..2ee3efb80 100644 --- a/src/quic_loss.c +++ b/src/quic_loss.c @@ -184,6 +184,7 @@ void qc_packet_loss_lookup(struct quic_pktns *pktns, struct quic_conn *qc, pktns->tx.loss_time = tick_first(pktns->tx.loss_time, loss_time_limit); else pktns->tx.loss_time = loss_time_limit; + break; } }