]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Too much useless traces in qc_build_frms()
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 8 Aug 2022 14:09:46 +0000 (16:09 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 8 Aug 2022 14:18:55 +0000 (16:18 +0200)
These traces about the available room into the packet currently built and
its payload length could be displayed for each STREAM frame, even for
those which have no chance to be embedded into a packet leading to
very traces to be displayed from a connection with a lot of stream.
This was revealed by traces provide by Tristan in GH #1808

May be backported to 2.6.

src/xprt_quic.c

index 75788e17baa5d10276557ec7ac64bdf90098bf15..3705608485cb030bcfdae547ef84a480c751dee2 100644 (file)
@@ -5925,11 +5925,11 @@ static inline int qc_build_frms(struct list *outlist, struct list *inlist,
                                ((cf->type & QUIC_STREAM_FRAME_TYPE_OFF_BIT) ? quic_int_getsize(cf->stream.offset.key) : 0);
                        /* Compute the data length of this STREAM frame. */
                        avail_room = room - hlen - *len;
-                       TRACE_PROTO("          New STREAM frame build (room, len)",
-                                   QUIC_EV_CONN_BCFRMS, qc, &room, len);
                        if ((ssize_t)avail_room <= 0)
                                continue;
 
+                       TRACE_PROTO("          New STREAM frame build (room, len)",
+                                   QUIC_EV_CONN_BCFRMS, qc, &room, len);
                        if (cf->type & QUIC_STREAM_FRAME_TYPE_LEN_BIT) {
                                dlen = max_available_room(avail_room, &dlen_sz);
                                if (dlen > cf->stream.len) {