From: Amaury Denoyelle Date: Fri, 27 Nov 2026 16:13:42 +0000 (+0100) Subject: MINOR: mux-quic: add conn flag on glitch error set X-Git-Url: https://git.kaiwu.me/http/%22../doc/static/%7B@url%7D?a=commitdiff_plain;h=a4ae233d42315a77dec78fc573ab606748f9dcaf;p=haproxy.git MINOR: mux-quic: add conn flag on glitch error set 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. --- diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index 98f497167..f5e21102b 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -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; diff --git a/src/mux_quic.c b/src/mux_quic.c index fb88cd7eb..e4a515bc0 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -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; }