]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: mux-quic: add conn flag on glitch error set
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 27 Nov 2026 16:13:42 +0000 (17:13 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 30 Nov 2026 10:01:34 +0000 (11:01 +0100)
Define a new connection flag QC_CF_GLITCH. It is set when the connection
has hit its maximum glitch level and an error was reported due to it.

This flag is a subset of QC_CF_ERRL: every connection flagged with
QC_CF_GLITCH is also flagged with QC_CF_ERRL, but not the reverse. The
main purpose of the new flag is to allow finer handling of connection
errors. This is also useful when debugging a connection that is on
error.

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

index 98f497167b8c7f254a2df8f712cea7249f3a88a7..f5e21102b6606457ea8cb5608d18f7f2ccf1fbae 100644 (file)
@@ -281,6 +281,7 @@ struct qcc_app_ops {
 #define QC_CF_CONN_SHUT 0x00000010 /* peer has initiated app layer shutdown - no new stream should be opened locally */
 #define QC_CF_ERR_CONN  0x00000020 /* fatal error reported by transport layer */
 #define QC_CF_WAIT_HS   0x00000040 /* MUX init before QUIC handshake completed (0-RTT) */
+#define QC_CF_GLITCH    0x00000080 /* glitch level reached and error reported */
 
 /* This function is used to report flags in debugging tools. Please reflect
  * below any single-bit flag addition above in the same order via the
@@ -298,7 +299,8 @@ static forceinline char *qcc_show_flags(char *buf, size_t len, const char *delim
        _(QC_CF_CONN_FULL,
        _(QC_CF_CONN_SHUT,
        _(QC_CF_ERR_CONN,
-       _(QC_CF_WAIT_HS)))))));
+       _(QC_CF_WAIT_HS,
+       _(QC_CF_GLITCH))))))));
        /* epilogue */
        _(~0U);
        return buf;
index fb88cd7eb63ae790e26a17f12fd29450421668a7..e4a515bc035d936ee9e913abdca467910a72dbb1 100644 (file)
@@ -883,6 +883,8 @@ int _qcc_report_glitch(struct qcc *qcc, int inc)
                        qcc_set_error(qcc, QC_ERR_INTERNAL_ERROR, 0,
                                      muxc_tevt_type_internal_err);
                }
+
+               qcc->flags |= QC_CF_GLITCH;
                return 1;
        }