]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: fix stats naming for flow control BLOCKED frames
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 25 May 2023 08:36:04 +0000 (10:36 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 26 May 2023 15:17:00 +0000 (17:17 +0200)
There was a misnaming in stats counter for *_BLOCKED frames in regard to
QUIC rfc convention. This patch fixes it to prevent future ambiguity :

- STREAMS_BLOCKED -> STREAM_DATA_BLOCKED
- STREAMS_DATA_BLOCKED_BIDI -> STREAMS_BLOCKED_BIDI
- STREAMS_DATA_BLOCKED_UNI -> STREAMS_BLOCKED_UNI

This should be backported up to 2.7.

include/haproxy/quic_conn-t.h
include/haproxy/quic_stats-t.h
src/quic_conn.c
src/quic_stats.c

index a245a2a94fdf35c18a7d74488fcebef88e68c4b1..b7931cd2905fd00ae6ff0e98106e6b56d20722f3 100644 (file)
@@ -613,9 +613,9 @@ struct quic_conn_cntrs {
        long long conn_migration_done;   /* total number of connection migration handled */
        /* Streams related counters */
        long long data_blocked;              /* total number of times DATA_BLOCKED frame was received */
-       long long stream_data_blocked;       /* total number of times STEAM_DATA_BLOCKED frame was received */
-       long long streams_data_blocked_bidi; /* total number of times STREAMS_DATA_BLOCKED_BIDI frame was received */
-       long long streams_data_blocked_uni;  /* total number of times STREAMS_DATA_BLOCKED_UNI frame was received */
+       long long stream_data_blocked;       /* total number of times STREAM_DATA_BLOCKED frame was received */
+       long long streams_blocked_bidi;      /* total number of times STREAMS_BLOCKED_BIDI frame was received */
+       long long streams_blocked_uni;       /* total number of times STREAMS_BLOCKED_UNI frame was received */
 };
 
 /* The number of buffers for outgoing packets (must be a power of two). */
index 75775f53f33e020a76093bbb4a2a1841a652ba2a..59032756194623d5521c29817910d4cb3d63bbeb 100644 (file)
@@ -50,8 +50,8 @@ enum {
        /* Stream related counters */
        QUIC_ST_DATA_BLOCKED,
        QUIC_ST_STREAM_DATA_BLOCKED,
-       QUIC_ST_STREAMS_DATA_BLOCKED_BIDI,
-       QUIC_ST_STREAMS_DATA_BLOCKED_UNI,
+       QUIC_ST_STREAMS_BLOCKED_BIDI,
+       QUIC_ST_STREAMS_BLOCKED_UNI,
        QUIC_STATS_COUNT /* must be the last */
 };
 
@@ -96,9 +96,9 @@ struct quic_counters {
        long long quic_transp_err_unknown_error;      /* total number of UNKNOWN_ERROR connection errors */
        /* Streams related counters */
        long long data_blocked;              /* total number of times DATA_BLOCKED frame was received */
-       long long stream_data_blocked;       /* total number of times STEAM_DATA_BLOCKED frame was received */
-       long long streams_data_blocked_bidi; /* total number of times STREAMS_DATA_BLOCKED_BIDI frame was received */
-       long long streams_data_blocked_uni;  /* total number of times STREAMS_DATA_BLOCKED_UNI frame was received */
+       long long stream_data_blocked;       /* total number of times STREAM_DATA_BLOCKED frame was received */
+       long long streams_blocked_bidi;      /* total number of times STREAMS_BLOCKED_BIDI frame was received */
+       long long streams_blocked_uni;       /* total number of times STREAMS_BLOCKED_UNI frame was received */
 };
 
 #endif /* USE_QUIC */
index 4b6c3b318960d1f17deb44523269a116d3ffe5e7..3498b4c926a6dad3245ad422bd41d0f767b8eab9 100644 (file)
@@ -3265,10 +3265,10 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt,
                        qc->cntrs.stream_data_blocked++;
                        break;
                case QUIC_FT_STREAMS_BLOCKED_BIDI:
-                       qc->cntrs.streams_data_blocked_bidi++;
+                       qc->cntrs.streams_blocked_bidi++;
                        break;
                case QUIC_FT_STREAMS_BLOCKED_UNI:
-                       qc->cntrs.streams_data_blocked_uni++;
+                       qc->cntrs.streams_blocked_uni++;
                        break;
                case QUIC_FT_NEW_CONNECTION_ID:
                        /* XXX TO DO XXX */
@@ -5739,8 +5739,8 @@ static inline void quic_conn_prx_cntrs_update(struct quic_conn *qc)
        /* Stream related counters */
        HA_ATOMIC_ADD(&qc->prx_counters->data_blocked, qc->cntrs.data_blocked);
        HA_ATOMIC_ADD(&qc->prx_counters->stream_data_blocked, qc->cntrs.stream_data_blocked);
-       HA_ATOMIC_ADD(&qc->prx_counters->streams_data_blocked_bidi, qc->cntrs.streams_data_blocked_bidi);
-       HA_ATOMIC_ADD(&qc->prx_counters->streams_data_blocked_uni, qc->cntrs.streams_data_blocked_uni);
+       HA_ATOMIC_ADD(&qc->prx_counters->streams_blocked_bidi, qc->cntrs.streams_blocked_bidi);
+       HA_ATOMIC_ADD(&qc->prx_counters->streams_blocked_uni, qc->cntrs.streams_blocked_uni);
 }
 
 /* Release the quic_conn <qc>. The connection is removed from the CIDs tree.
index 8289b24f7b3eb9a9f6ab5fdfd71e7819cc509b9c..3657f308c461daee3e701ae71013d84a7545718e 100644 (file)
@@ -81,11 +81,11 @@ static struct name_desc quic_stats[] = {
        [QUIC_ST_DATA_BLOCKED]              = { .name = "quic_data_blocked",
                                                .desc = "Total number of received DATA_BLOCKED frames" },
        [QUIC_ST_STREAM_DATA_BLOCKED]       = { .name = "quic_stream_data_blocked",
-                                               .desc = "Total number of received STREAMS_BLOCKED frames" },
-       [QUIC_ST_STREAMS_DATA_BLOCKED_BIDI] = { .name = "quic_streams_data_blocked_bidi",
-                                               .desc = "Total number of received STREAM_DATA_BLOCKED_BIDI frames" },
-       [QUIC_ST_STREAMS_DATA_BLOCKED_UNI]  = { .name = "quic_streams_data_blocked_uni",
-                                               .desc = "Total number of received STREAM_DATA_BLOCKED_UNI frames" },
+                                               .desc = "Total number of received STREAM_DATA_BLOCKED frames" },
+       [QUIC_ST_STREAMS_BLOCKED_BIDI]      = { .name = "quic_streams_blocked_bidi",
+                                               .desc = "Total number of received STREAMS_BLOCKED_BIDI frames" },
+       [QUIC_ST_STREAMS_BLOCKED_UNI]       = { .name = "quic_streams_blocked_uni",
+                                               .desc = "Total number of received STREAMS_BLOCKED_UNI frames" },
 };
 
 struct quic_counters quic_counters;
@@ -135,8 +135,8 @@ static void quic_fill_stats(void *data, struct field *stats)
        /* Streams related counters */
        stats[QUIC_ST_DATA_BLOCKED]              = mkf_u64(FN_COUNTER, counters->data_blocked);
        stats[QUIC_ST_STREAM_DATA_BLOCKED]       = mkf_u64(FN_COUNTER, counters->stream_data_blocked);
-       stats[QUIC_ST_STREAMS_DATA_BLOCKED_BIDI] = mkf_u64(FN_COUNTER, counters->streams_data_blocked_bidi);
-       stats[QUIC_ST_STREAMS_DATA_BLOCKED_UNI]  = mkf_u64(FN_COUNTER, counters->streams_data_blocked_uni);
+       stats[QUIC_ST_STREAMS_BLOCKED_BIDI]      = mkf_u64(FN_COUNTER, counters->streams_blocked_bidi);
+       stats[QUIC_ST_STREAMS_BLOCKED_UNI]       = mkf_u64(FN_COUNTER, counters->streams_blocked_uni);
 }
 
 struct stats_module quic_stats_module = {