From eba9088a7c8ea4e1b0de6a9db38c6a39d5d4b204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 25 Aug 2022 16:06:48 +0200 Subject: [PATCH] Revert "MINOR: quic: Remove useless traces about references to TX packets" This reverts commit f61398a7caa35d780639a5961d2b1ea427f710b6. After having checked a version with more traces and reproduced the issue as reported by Tristan in GH #1808, there are remaining cases where a duplicated but not already sent frame have to be marked as acked because the frame it was copied from was acknowledeged before its copied was sent. Must be backported to 2.6. --- src/xprt_quic.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 30af64e14..0aad27213 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -1475,8 +1475,14 @@ static void qc_frm_unref(struct quic_conn *qc, struct quic_frame *frm) list_for_each_entry_safe(f, tmp, &frm->reflist, ref) { f->origin = NULL; LIST_DELETE(&f->ref); - TRACE_DEVEL("remove frame reference", - QUIC_EV_CONN_PRSAFRM, qc, f, &f->pkt->pn_node.key); + if (f->pkt) { + TRACE_DEVEL("remove frame reference", + QUIC_EV_CONN_PRSAFRM, qc, f, &f->pkt->pn_node.key); + } + else { + TRACE_DEVEL("remove frame reference for unsent frame", + QUIC_EV_CONN_PRSAFRM, qc, f); + } } TRACE_LEAVE(QUIC_EV_CONN_PRSAFRM, qc); @@ -1502,9 +1508,15 @@ void qc_release_frm(struct quic_conn *qc, struct quic_frame *frm) * the current one. */ list_for_each_entry_safe(f, tmp, &origin->reflist, ref) { - pn = f->pkt->pn_node.key; - TRACE_DEVEL("mark frame as acked from packet", - QUIC_EV_CONN_PRSAFRM, qc, f, &pn); + if (f->pkt) { + pn = f->pkt->pn_node.key; + TRACE_DEVEL("mark frame as acked from packet", + QUIC_EV_CONN_PRSAFRM, qc, f, &pn); + } + else { + TRACE_DEVEL("mark unsend frame as acked", + QUIC_EV_CONN_PRSAFRM, qc, f); + } f->flags |= QUIC_FL_TX_FRAME_ACKED; f->origin = NULL; LIST_DELETE(&f->ref);