]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: display unknown error sendto counter on stat page
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 24 Oct 2022 08:44:34 +0000 (10:44 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 24 Oct 2022 08:52:59 +0000 (10:52 +0200)
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
src/quic_stats.c

index 707825e4ad5d1749d92933a409578fbee976ea89..08e9caadb64894348c2590c99bdc819f82d58423 100644 (file)
@@ -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,
index c81712918db1bf164301c6aee72831e43dc712f5..73b03e42ab4e82b8dfdd7ef7b29def8efda4009f 100644 (file)
@@ -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);