From 6dead91b8a10c7068d44b8a81ce5efaead5699dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 30 Jan 2023 17:27:32 +0100 Subject: [PATCH] MINOR: quic: Add a trace about variable states in qc_prep_fast_retrans() This has already been very useful to diagnose retransmission issues. Must be backported to 2.6 and 2.7. --- src/quic_conn.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/quic_conn.c b/src/quic_conn.c index f0935f2..e4f1d12 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -2471,6 +2471,9 @@ static void qc_prep_fast_retrans(struct quic_conn *qc, pkt = eb64_entry(node, struct quic_tx_packet, pn_node); node = eb64_next(node); /* Skip the empty and coalesced packets */ + TRACE_PRINTF(TRACE_LEVEL_DEVELOPER, QUIC_EV_CONN_SPPKTS, qc, 0, 0, 0, + "--> pn=%llu (%d %d)", (ull)pkt->pn_node.key, + LIST_ISEMPTY(&pkt->frms), !!(pkt->flags & QUIC_FL_TX_PACKET_COALESCED)); if (!LIST_ISEMPTY(&pkt->frms) && !(pkt->flags & QUIC_FL_TX_PACKET_COALESCED)) break; } @@ -2524,6 +2527,9 @@ static void qc_prep_hdshk_fast_retrans(struct quic_conn *qc, /* Skip the empty packet (they have already been retransmitted) */ while (node) { pkt = eb64_entry(node, struct quic_tx_packet, pn_node); + TRACE_PRINTF(TRACE_LEVEL_DEVELOPER, QUIC_EV_CONN_SPPKTS, qc, 0, 0, 0, + "--> pn=%llu (%d %d)", (ull)pkt->pn_node.key, + LIST_ISEMPTY(&pkt->frms), !!(pkt->flags & QUIC_FL_TX_PACKET_COALESCED)); if (!LIST_ISEMPTY(&pkt->frms) && !(pkt->flags & QUIC_FL_TX_PACKET_COALESCED)) break; node = eb64_next(node); -- 1.7.10.4