From: Amaury Denoyelle Date: Mon, 11 May 2026 08:05:12 +0000 (+0200) Subject: MINOR: mux_quic: use qcm prefix for traces functions/structs X-Git-Tag: v3.4-dev12~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e68d4c9c364ea2f8b031bb6062ca20f50c021d89;p=thirdparty%2Fhaproxy.git MINOR: mux_quic: use qcm prefix for traces functions/structs 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. --- diff --git a/include/haproxy/qcm_trace.h b/include/haproxy/qcm_trace.h index 00066851f..113bfcec0 100644 --- a/include/haproxy/qcm_trace.h +++ b/include/haproxy/qcm_trace.h @@ -10,10 +10,10 @@ 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 */ diff --git a/src/mux_quic.c b/src/mux_quic.c index 690bdc4c2..91a47c731 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -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", diff --git a/src/qcm_trace.c b/src/qcm_trace.c index 88f3a305f..136b24fd5 100644 --- a/src/qcm_trace.c +++ b/src/qcm_trace.c @@ -11,43 +11,43 @@ #include /* 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);