Skip to content

Commit 4fd6d15

Browse files
committed
MINOR: mux-quic/h3: count glitches when they're reported
The qcc_report_glitch() function is now replaced with a macro to support enumerating counters for each individual glitch line. For now this adds 36 such counters. The macro supports an optional description, though that is not being used for now. As a reminder, this requires to build with -DDEBUG_GLITCHES=1.
1 parent 42710b7 commit 4fd6d15

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/haproxy/mux_quic.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@
1212
#include <haproxy/mux_quic-t.h>
1313
#include <haproxy/stconn.h>
1414

15+
#define qcc_report_glitch(qcc, inc, ...) ({ \
16+
COUNT_GLITCH(__VA_ARGS__); \
17+
_qcc_report_glitch(qcc, inc); \
18+
})
19+
1520
void qcc_set_error(struct qcc *qcc, int err, int app);
16-
int qcc_report_glitch(struct qcc *qcc, int inc);
21+
int _qcc_report_glitch(struct qcc *qcc, int inc);
1722
struct qcs *qcc_init_stream_local(struct qcc *qcc, int bidi);
1823
void qcs_send_metadata(struct qcs *qcs);
1924
struct stconn *qcs_attach_sc(struct qcs *qcs, struct buffer *buf, char fin);

src/mux_quic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ void qcc_set_error(struct qcc *qcc, int err, int app)
718718
/* Increment glitch counter for <qcc> connection by <inc> steps. If configured
719719
* threshold reached, close the connection with an error code.
720720
*/
721-
int qcc_report_glitch(struct qcc *qcc, int inc)
721+
int _qcc_report_glitch(struct qcc *qcc, int inc)
722722
{
723723
const int max = global.tune.quic_frontend_glitches_threshold;
724724

0 commit comments

Comments
 (0)