]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: define flag for backend side
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 11 Jun 2025 09:30:24 +0000 (11:30 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 12 Jun 2025 09:28:54 +0000 (11:28 +0200)
Mux connection is flagged with new QC_CF_IS_BACK if used on the backend
side. For now the only change is during traces, to be able to
differentiate frontend and backend usage.

include/haproxy/mux_quic-t.h
src/mux_quic.c
src/qmux_trace.c

index 068f14eef0be6b25acb9c625d14f6091bfe1cc9e..4aaaf9b3433b0a9052b80e3098b958ab13e72ce2 100644 (file)
@@ -232,7 +232,7 @@ struct qcc_app_ops {
 
 #define QC_CF_ERRL      0x00000001 /* fatal error detected locally, connection should be closed soon */
 #define QC_CF_ERRL_DONE 0x00000002 /* local error properly handled, connection can be released */
-/* unused 0x00000004 */
+#define QC_CF_IS_BACK   0x00000004 /* backend side */
 #define QC_CF_CONN_FULL 0x00000008 /* no stream buffers available on connection */
 /* unused 0x00000010 */
 #define QC_CF_ERR_CONN  0x00000020 /* fatal error reported by transport layer */
index ae38867d4ee13ebe20fd0c5248691e31ec2636b8..2d2720d683ca94ac3392931b9fd5d4690db34b9c 100644 (file)
@@ -3417,7 +3417,7 @@ static int qmux_init(struct connection *conn, struct proxy *prx,
        _qcc_init(qcc);
        conn->ctx = qcc;
        qcc->nb_hreq = qcc->nb_sc = 0;
-       qcc->flags = 0;
+       qcc->flags = conn_is_back(conn) ? QC_CF_IS_BACK : 0;
        qcc->app_st = QCC_APP_ST_NULL;
        qcc->glitches = 0;
        qcc->err = quic_err_transport(QC_ERR_NO_ERROR);
index 2725647395fb41c2577123631ebfb94ebc1771e5..6e879bb69b64278e27d483abd025942123d7816d 100644 (file)
@@ -145,7 +145,7 @@ void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc)
 {
        const struct quic_conn *qc = qcc->conn->handle.qc;
 
-       chunk_appendf(msg, " qcc=%p(F)", qcc);
+       chunk_appendf(msg, " qcc=%p(%c)", qcc, (qcc->flags & QC_CF_IS_BACK) ? 'B' : 'F');
        if (qcc->conn->handle.qc)
                chunk_appendf(msg, " qc=%p", qcc->conn->handle.qc);
        chunk_appendf(msg, " .st=%s .sc=%llu .hreq=%llu .flg=0x%04x",