]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: add traces for 0-copy/fast-forward
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 7 Dec 2023 14:53:02 +0000 (15:53 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 7 Dec 2023 16:06:55 +0000 (17:06 +0100)
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
src/mux_quic.c

index c849bde1373f6f7e047c9b510516a830d2848ee3..f535d858808017892e5ae730c252c371f8285db3 100644 (file)
--- 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.
                 */
index 037416bd6bdcc058c46ca6bafc3cc8585c6a9a5a..2122509a6c8da5a52652671f437ef6965b2926a3 100644 (file)
@@ -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;