From 0338778c41a83a3a74a3b53647a29dcc90295237 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 7 Dec 2023 15:53:02 +0100 Subject: [PATCH] MINOR: mux-quic: add traces for 0-copy/fast-forward Complete qmux traces : * add a trace when 0-copy is used for DATA transfer * mark the FIN as detected when using fast forward --- src/h3.c | 3 +++ src/mux_quic.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/h3.c b/src/h3.c index c849bde13..f535d8588 100644 --- a/src/h3.c +++ b/src/h3.c @@ -1776,6 +1776,9 @@ static int h3_resp_data_send(struct qcs *qcs, struct buffer *buf, size_t count) htx_nbblks(htx) == 1 && type == HTX_BLK_DATA)) { void *old_area = res->area; + TRACE_DATA("perform zero-copy DATA transfer", H3_EV_TX_DATA, + qcs->qcc->conn, qcs); + /* map an H2 frame to the HTX block so that we can put the * frame header there. */ diff --git a/src/mux_quic.c b/src/mux_quic.c index 037416bd6..2122509a6 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2870,8 +2870,10 @@ static size_t qmux_strm_done_ff(struct stconn *sc) TRACE_ENTER(QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs); - if (sd->iobuf.flags & IOBUF_FL_EOI) + if (sd->iobuf.flags & IOBUF_FL_EOI) { + TRACE_STATE("reached stream fin", QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs); qcs->flags |= QC_SF_FIN_STREAM; + } if (!(qcs->flags & QC_SF_FIN_STREAM) && !sd->iobuf.data) goto end;