]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Add a trace for packet with an ACK frame
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 7 Apr 2023 17:01:33 +0000 (19:01 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 11 Apr 2023 08:47:19 +0000 (10:47 +0200)
As the ACK frames are not added to the packet list of ack-eliciting frames,
it could not be traced. But there is a flag to identify such packet.
Let's use it to add this information to the traces of TX packets.

Must be backported to 2.6 and 2.7.

src/quic_conn.c

index 0cce20b2c07802682dc30ab462a565b13f327d6d..2d90ab3ef4fab6af4a21e0fbcc89dc2f5ee6d2ad 100644 (file)
@@ -658,6 +658,8 @@ static void quic_trace(enum trace_level level, uint64_t mask, const struct trace
                                     (unsigned long long)qc->path->in_flight);
                        if (pkt) {
                                const struct quic_frame *frm;
+                               if (pkt->flags & QUIC_FL_TX_PACKET_ACK)
+                                   chunk_appendf(&trace_buf, " ack");
                                chunk_appendf(&trace_buf, " pn=%lu(%s) iflen=%llu",
                                              (unsigned long)pkt->pn_node.key,
                                              pkt->pktns == &qc->pktns[QUIC_TLS_PKTNS_INITIAL] ? "I" :