diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h index 9cb163ae9..e72ad6a74 100644 --- a/include/haproxy/xprt_quic-t.h +++ b/include/haproxy/xprt_quic-t.h @@ -226,6 +226,7 @@ enum quic_pkt_type { #define QUIC_EV_CONN_FREED (1ULL << 39) #define QUIC_EV_CONN_CLOSE (1ULL << 40) #define QUIC_EV_CONN_ACKSTRM (1ULL << 41) +#define QUIC_EV_CONN_FRMLIST (1ULL << 42) /* Similar to kernel min()/max() definitions. */ #define QUIC_MIN(a, b) ({ \ diff --git a/src/xprt_quic.c b/src/xprt_quic.c index bc96b3c57..37d6d15f8 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -121,6 +121,7 @@ static const struct trace_event quic_trace_events[] = { { .mask = QUIC_EV_CONN_FREED, .name = "conn_freed", .desc = "releasing conn. memory" }, { .mask = QUIC_EV_CONN_CLOSE, .name = "conn_close", .desc = "closing conn." }, { .mask = QUIC_EV_CONN_ACKSTRM, .name = "ack_strm", .desc = "STREAM ack."}, + { .mask = QUIC_EV_CONN_FRMLIST, .name = "frm_list", .desc = "frame list"}, { /* end */ } }; @@ -286,6 +287,16 @@ static void quic_trace(enum trace_level level, uint64_t mask, const struct trace } + if (mask & QUIC_EV_CONN_FRMLIST) { + const struct list *l = a2; + + if (l) { + const struct quic_frame *frm; + list_for_each_entry(frm, l, list) + chunk_frm_appendf(&trace_buf, frm); + } + } + if (mask & (QUIC_EV_CONN_HPKT|QUIC_EV_CONN_PAPKT)) { const struct quic_tx_packet *pkt = a2; const struct quic_enc_level *qel = a3; @@ -5293,6 +5304,7 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end, if (!cc && !LIST_ISEMPTY(frms)) { ssize_t room = end - pos; + TRACE_PROTO("Avail. ack eliciting frames", QUIC_EV_CONN_FRMLIST, qc, frms); /* Initialize the length of the frames built below to . * If any frame could be successfully built by qc_build_frms(), * we will have len_frms > len. @@ -5419,14 +5431,15 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end, pkt->len = pos - beg; LIST_SPLICE(&pkt->frms, &frm_list); - TRACE_PROTO("Ack eliciting frame", QUIC_EV_CONN_HPKT, qc, pkt); + TRACE_PROTO("Packet ack-eliciting frames", QUIC_EV_CONN_HPKT, qc, pkt); return 1; no_room: /* Replace the pre-built frames which could not be add to this packet */ LIST_SPLICE(frms, &frm_list); - TRACE_PROTO("Not enough room", QUIC_EV_CONN_HPKT, qc); + TRACE_PROTO("Remaining ack-eliciting frames", QUIC_EV_CONN_HPKT, qc, pkt); + return 0; }