]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert "MINOR: quic: Remove useless traces about references to TX packets"
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 25 Aug 2022 14:06:48 +0000 (16:06 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 25 Aug 2022 14:06:48 +0000 (16:06 +0200)
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

index 30af64e143aee2586eb63e44285e7df7a5d62670..0aad272138771ccd4f11b35344206b2f468d793a 100644 (file)
@@ -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);