]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Remove useless traces about references to TX packets
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 25 Aug 2022 05:13:33 +0000 (07:13 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 25 Aug 2022 05:35:47 +0000 (07:35 +0200)
Since this commit:
    "BUG/MINOR: quic: Wrong list_for_each_entry() use when building packets from
     qc_do_build_pkt()"
there is no more reason that frames can be released without having been
sent, i.e. frames with non null ->pkt member. This ->pkt is the packet
the frame is attached to.

Must be backported to 2.6.

src/xprt_quic.c

index ffa2cba1facf540c522c0bb368e007cd165d7cec..30af64e143aee2586eb63e44285e7df7a5d62670 100644 (file)
@@ -1475,15 +1475,8 @@ 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);
-               if (f->pkt) {
-                       TRACE_DEVEL("remove frame reference",
-                                   QUIC_EV_CONN_PRSAFRM, qc, f, &f->pkt->pn_node.key);
-               }
-               else {
-                       /* XXX TODO: what must be done for such a frame */
-                       TRACE_DEVEL("remove frame reference for unsent frame",
-                                   QUIC_EV_CONN_PRSAFRM, qc, f);
-               }
+               TRACE_DEVEL("remove frame reference",
+                           QUIC_EV_CONN_PRSAFRM, qc, f, &f->pkt->pn_node.key);
        }
 
        TRACE_LEAVE(QUIC_EV_CONN_PRSAFRM, qc);
@@ -1509,16 +1502,9 @@ 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) {
-               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 {
-                       /* XXX TODO: what must be done for such a frame */
-                       TRACE_DEVEL("mark frame as acked for unsent frame",
-                                   QUIC_EV_CONN_PRSAFRM, qc, f);
-               }
+               pn = f->pkt->pn_node.key;
+               TRACE_DEVEL("mark frame as acked from packet",
+                           QUIC_EV_CONN_PRSAFRM, qc, f, &pn);
                f->flags |= QUIC_FL_TX_FRAME_ACKED;
                f->origin = NULL;
                LIST_DELETE(&f->ref);