]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux_quic: use qcm prefix for traces functions/structs
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 11 May 2026 08:05:12 +0000 (10:05 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 13 May 2026 14:15:48 +0000 (16:15 +0200)
This is a follow-up on the QUIC MUX renaming process.

This patch renames several definitions in QUIC MUX traces source code.
This is only an internal change. Trace source name is kept to "qmux" for
now, but will be changed in a dedicated patch.

include/haproxy/qcm_trace.h
src/mux_quic.c
src/qcm_trace.c

index 00066851fac90ba746da1372dcb1f6e2905252fe..113bfcec0db617016a3bb714480abe5de4257bc9 100644 (file)
 struct qcc;
 struct qcs;
 
-extern struct trace_source trace_qmux;
-#define TRACE_SOURCE    &trace_qmux
+extern struct trace_source trace_qcm;
+#define TRACE_SOURCE    &trace_qcm
 
-static const struct trace_event qmux_trace_events[] = {
+static const struct trace_event qcm_trace_events[] = {
 #define           QMUX_EV_QCC_NEW       (1ULL << 0)
        { .mask = QMUX_EV_QCC_NEW ,     .name = "qcc_new",     .desc = "new QUIC connection" },
 #define           QMUX_EV_QCC_RECV      (1ULL << 1)
@@ -72,8 +72,8 @@ struct qcs_build_stream_trace_arg {
        uint64_t offset;
 };
 
-void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc);
-void qmux_dump_qcs_info(struct buffer *msg, const struct qcs *qcs);
+void qcm_dump_qcc_info(struct buffer *msg, const struct qcc *qcc);
+void qcm_dump_qcs_info(struct buffer *msg, const struct qcs *qcs);
 
 #endif /* USE_QUIC */
 
index 690bdc4c2260b967ffd873890770aeb75dc1f422..91a47c7316b40544941dd5bb3f6a3292e90597c3 100644 (file)
@@ -4667,10 +4667,10 @@ static int qcm_sctl(struct stconn *sc, enum mux_sctl_type mux_sctl, void *output
                buf = get_trash_chunk();
 
                if (dbg_ctx->arg.debug_flags & MUX_SCTL_DBG_STR_L_MUXS)
-                       qmux_dump_qcs_info(buf, qcs);
+                       qcm_dump_qcs_info(buf, qcs);
 
                if (dbg_ctx->arg.debug_flags & MUX_SCTL_DBG_STR_L_MUXC)
-                       qmux_dump_qcc_info(buf, qcc);
+                       qcm_dump_qcc_info(buf, qcc);
 
                if (dbg_ctx->arg.debug_flags & MUX_SCTL_DBG_STR_L_CONN) {
                        chunk_appendf(buf, " conn.flg=%#08x conn.err_code=%u conn.evts=%s",
index 88f3a305fd3b7a5b1f59eab5cd2db5c2f4ff4138..136b24fd53e62cc0c8d4dbc4a19b5a5508523419 100644 (file)
 #include <haproxy/stconn.h>
 
 /* trace source and events */
-static void qmux_trace(enum trace_level level, uint64_t mask,
+static void qcm_trace(enum trace_level level, uint64_t mask,
                        const struct trace_source *src,
                        const struct ist where, const struct ist func,
                        const void *a1, const void *a2, const void *a3, const void *a4);
 
-static void qmux_trace_fill_ctx(struct trace_ctx *ctx, const struct trace_source *src,
+static void qcm_trace_fill_ctx(struct trace_ctx *ctx, const struct trace_source *src,
                                 const void *a1, const void *a2, const void *a3, const void *a4);
 
-static const struct name_desc qmux_trace_lockon_args[4] = {
+static const struct name_desc qcm_trace_lockon_args[4] = {
        /* arg1 */ { /* already used by the connection */ },
        /* arg2 */ { .name="qcs", .desc="QUIC stream" },
        /* arg3 */ { },
        /* arg4 */ { }
 };
 
-static const struct name_desc qmux_trace_decoding[] = {
-#define QMUX_VERB_CLEAN    1
+static const struct name_desc qcm_trace_decoding[] = {
+#define QCM_VERB_CLEAN    1
        { .name="clean",    .desc="only user-friendly stuff, generally suitable for level \"user\"" },
-#define QMUX_VERB_MINIMAL  2
+#define QCM_VERB_MINIMAL  2
        { .name="minimal",  .desc="report only qcc/qcs state and flags, no real decoding" },
        { /* end */ }
 };
 
-struct trace_source trace_qmux = {
+struct trace_source trace_qcm = {
        .name = IST("qmux"),
        .desc = "QUIC multiplexer",
        .arg_def = TRC_ARG1_CONN,  /* TRACE()'s first argument is always a connection */
-       .default_cb = qmux_trace,
-       .fill_ctx = qmux_trace_fill_ctx,
-       .known_events = qmux_trace_events,
-       .lockon_args = qmux_trace_lockon_args,
-       .decoding = qmux_trace_decoding,
+       .default_cb = qcm_trace,
+       .fill_ctx = qcm_trace_fill_ctx,
+       .known_events = qcm_trace_events,
+       .lockon_args = qcm_trace_lockon_args,
+       .decoding = qcm_trace_decoding,
        .report_events = ~0,  /* report everything by default */
 };
 
 
-static void qmux_trace_frm(const struct quic_frame *frm)
+static void qcm_trace_frm(const struct quic_frame *frm)
 {
        switch (frm->type) {
        case QUIC_FT_MAX_STREAMS_BIDI:
@@ -66,10 +66,10 @@ static void qmux_trace_frm(const struct quic_frame *frm)
 }
 
 /* quic-mux trace handler */
-static void qmux_trace(enum trace_level level, uint64_t mask,
-                       const struct trace_source *src,
-                       const struct ist where, const struct ist func,
-                       const void *a1, const void *a2, const void *a3, const void *a4)
+static void qcm_trace(enum trace_level level, uint64_t mask,
+                      const struct trace_source *src,
+                      const struct ist where, const struct ist func,
+                      const void *a1, const void *a2, const void *a3, const void *a4)
 {
        const struct connection *conn = a1;
        const struct qcc *qcc   = conn ? conn->ctx : NULL;
@@ -78,11 +78,11 @@ static void qmux_trace(enum trace_level level, uint64_t mask,
        if (!qcc)
                return;
 
-       if (src->verbosity > QMUX_VERB_CLEAN) {
-               qmux_dump_qcc_info(&trace_buf, qcc);
+       if (src->verbosity > QCM_VERB_CLEAN) {
+               qcm_dump_qcc_info(&trace_buf, qcc);
 
                if (qcs)
-                       qmux_dump_qcs_info(&trace_buf, qcs);
+                       qcm_dump_qcs_info(&trace_buf, qcs);
 
                if (mask & QMUX_EV_QCC_NQCS) {
                        const uint64_t *id = a3;
@@ -90,7 +90,7 @@ static void qmux_trace(enum trace_level level, uint64_t mask,
                }
 
                if (mask & QMUX_EV_SEND_FRM)
-                       qmux_trace_frm(a3);
+                       qcm_trace_frm(a3);
 
                if (mask & QMUX_EV_QCS_XFER_DATA) {
                        const struct qcs_xfer_data_trace_arg *arg = a3;
@@ -107,7 +107,7 @@ static void qmux_trace(enum trace_level level, uint64_t mask,
 }
 
 /* This fills the trace_ctx with extra info guessed from the args */
-static void qmux_trace_fill_ctx(struct trace_ctx *ctx, const struct trace_source *src,
+static void qcm_trace_fill_ctx(struct trace_ctx *ctx, const struct trace_source *src,
                                const void *a1, const void *a2, const void *a3, const void *a4)
 {
        const struct connection *conn = a1;
@@ -142,7 +142,7 @@ static char *qcc_app_st_to_str(const enum qcc_app_st st)
        }
 }
 
-void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc)
+void qcm_dump_qcc_info(struct buffer *msg, const struct qcc *qcc)
 {
        const struct quic_conn *qc = conn_is_quic(qcc->conn) ? qcc->conn->handle.qc : NULL;
 
@@ -159,7 +159,7 @@ void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc)
                chunk_appendf(msg, " bwnd=%llu/%llu", (ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd);
 }
 
-void qmux_dump_qcs_info(struct buffer *msg, const struct qcs *qcs)
+void qcm_dump_qcs_info(struct buffer *msg, const struct qcs *qcs)
 {
        chunk_appendf(msg, " qcs=%p .id=%llu .st=%s .flg=0x%04x", qcs, (ullong)qcs->id,
                      qcs_st_to_str(qcs->st), qcs->flags);