From 7941ead3aa00c9e83fadf70a1d6d515d20421ad0 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Mon, 24 Oct 2022 10:44:34 +0200 Subject: [PATCH] MINOR: quic: display unknown error sendto counter on stat page This patch complete the previous incomplete commit. The new counter sendto_err_unknown is now displayed on stats page/CLI show stats. This is related to github issue #1903. This should be backported up to 2.6. --- include/haproxy/quic_stats-t.h | 1 + src/quic_stats.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/haproxy/quic_stats-t.h b/include/haproxy/quic_stats-t.h index 707825e4ad..08e9caadb6 100644 --- a/include/haproxy/quic_stats-t.h +++ b/include/haproxy/quic_stats-t.h @@ -14,6 +14,7 @@ enum { QUIC_ST_DROPPED_PARSING, QUIC_ST_SOCKET_FULL, QUIC_ST_SENDTO_ERR, + QUIC_ST_SENDTO_ERR_UNKNWN, QUIC_ST_LOST_PACKET, QUIC_ST_TOO_SHORT_INITIAL_DGRAM, QUIC_ST_RETRY_SENT, diff --git a/src/quic_stats.c b/src/quic_stats.c index c81712918d..73b03e42ab 100644 --- a/src/quic_stats.c +++ b/src/quic_stats.c @@ -13,6 +13,8 @@ static struct name_desc quic_stats[] = { .desc = "Total number of EAGAIN error on sendto() calls" }, [QUIC_ST_SENDTO_ERR] = { .name = "quic_sendto_err", .desc = "Total number of error on sendto() calls, EAGAIN excepted" }, + [QUIC_ST_SENDTO_ERR_UNKNWN] = { .name = "quic_sendto_err_unknwn", + .desc = "Total number of error on sendto() calls not explicitely listed" }, [QUIC_ST_LOST_PACKET] = { .name = "quic_lost_pkt", .desc = "Total number of lost sent packets" }, [QUIC_ST_TOO_SHORT_INITIAL_DGRAM] = { .name = "quic_too_short_dgram", @@ -90,6 +92,7 @@ static void quic_fill_stats(void *data, struct field *stats) stats[QUIC_ST_DROPPED_PARSING] = mkf_u64(FN_COUNTER, counters->dropped_parsing); stats[QUIC_ST_SOCKET_FULL] = mkf_u64(FN_COUNTER, counters->socket_full); stats[QUIC_ST_SENDTO_ERR] = mkf_u64(FN_COUNTER, counters->sendto_err); + stats[QUIC_ST_SENDTO_ERR_UNKNWN] = mkf_u64(FN_COUNTER, counters->sendto_err_unknown); stats[QUIC_ST_LOST_PACKET] = mkf_u64(FN_COUNTER, counters->lost_pkt); stats[QUIC_ST_TOO_SHORT_INITIAL_DGRAM] = mkf_u64(FN_COUNTER, counters->too_short_initial_dgram); stats[QUIC_ST_RETRY_SENT] = mkf_u64(FN_COUNTER, counters->retry_sent); -- 2.47.3