From: Frédéric Lécaille Date: Thu, 25 Aug 2022 14:06:48 +0000 (+0200) Subject: Revert "MINOR: quic: Remove useless traces about references to TX packets" X-Git-Tag: v2.7-dev5~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eba9088a7c8ea4e1b0de6a9db38c6a39d5d4b204;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 30af64e143..0aad272138 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);