MINOR: mux-quic: add trace event for local error
Add a dedicated trace event QMUX_EV_QCC_ERR. This is used for locally
detected error when a CONNECTION_CLOSE should be emitted.
This should be backported up to 2.7.
diff --git a/include/haproxy/qmux_trace.h b/include/haproxy/qmux_trace.h
index 0bc89a3..ff850f0 100644
--- a/include/haproxy/qmux_trace.h
+++ b/include/haproxy/qmux_trace.h
@@ -48,6 +48,8 @@
{ .mask = QMUX_EV_QCS_BUILD_STRM, .name = "qcs_build_stream_frm", .desc = "qcs_build_stream_frm" },
#define QMUX_EV_PROTO_ERR (1ULL << 17)
{ .mask = QMUX_EV_PROTO_ERR, .name = "proto_err", .desc = "protocol error" },
+#define QMUX_EV_QCC_ERR (1ULL << 18)
+ { .mask = QMUX_EV_QCC_ERR, .name = "qcc_err", .desc = "connection on error" },
{ }
};
diff --git a/src/mux_quic.c b/src/mux_quic.c
index bd67417..7adb121 100644
--- a/src/mux_quic.c
+++ b/src/mux_quic.c
@@ -34,7 +34,7 @@
/* This function must not be called multiple times. */
BUG_ON(qcc->flags & QC_CF_CC_EMIT);
- TRACE_STATE("set CONNECTION_CLOSE on quic-conn", QMUX_EV_QCC_WAKE, qcc->conn);
+ TRACE_STATE("set CONNECTION_CLOSE on quic-conn", QMUX_EV_QCC_ERR, qcc->conn);
quic_set_connection_close(qcc->conn->handle.qc, quic_err_transport(err));
qcc->flags |= QC_CF_CC_EMIT;
tasklet_wakeup(qcc->wait_event.tasklet);
@@ -2448,7 +2448,7 @@
HA_ATOMIC_STORE(&conn->handle.qc->qcc, qcc);
if (qcc_install_app_ops(qcc, conn->handle.qc->app_ops)) {
- TRACE_PROTO("Cannot install app layer", QMUX_EV_QCC_NEW, qcc->conn);
+ TRACE_PROTO("Cannot install app layer", QMUX_EV_QCC_NEW|QMUX_EV_QCC_ERR, qcc->conn);
/* prepare a CONNECTION_CLOSE frame */
quic_set_connection_close(conn->handle.qc, quic_err_transport(QC_ERR_APPLICATION_ERROR));
goto fail_install_app_ops;