diff options
author | Damjan Marion <damarion@cisco.com> | 2022-03-14 13:04:38 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-03-31 15:51:26 +0000 |
commit | 66c858385f3dc1c36682771424a8a9e5a6cd8355 (patch) | |
tree | 7ed7b67b6ee084ce0c1cd9a6d25e3021d3110442 /src/vpp-api/client | |
parent | 8f60318aca8f1df267f1b9069bc9697e9c4b65b0 (diff) |
stats: convert error counters to normal counters
Change-Id: I9794da718805b40cc922e4f3cf316255398029a9
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/client')
-rw-r--r-- | src/vpp-api/client/stat_client.c | 16 | ||||
-rw-r--r-- | src/vpp-api/client/test.c | 7 |
2 files changed, 1 insertions, 22 deletions
diff --git a/src/vpp-api/client/stat_client.c b/src/vpp-api/client/stat_client.c index a5eafaf5f68..2e8e1fadf8d 100644 --- a/src/vpp-api/client/stat_client.c +++ b/src/vpp-api/client/stat_client.c @@ -231,7 +231,6 @@ copy_data (vlib_stats_entry_t *ep, u32 index2, char *name, int i; vlib_counter_t **combined_c; /* Combined counter */ counter_t **simple_c; /* Simple counter */ - uint64_t *error_vector; assert (sm->shared_header); @@ -271,18 +270,6 @@ copy_data (vlib_stats_entry_t *ep, u32 index2, char *name, } break; - case STAT_DIR_TYPE_ERROR_INDEX: - /* Gather errors from all threads into a vector */ - error_vector = - stat_segment_adjust (sm, (void *) sm->shared_header->error_vector); - vec_validate (result.error_vector, vec_len (error_vector) - 1); - for (i = 0; i < vec_len (error_vector); i++) - { - counter_t *cb = stat_segment_adjust (sm, (void *) error_vector[i]); - result.error_vector[i] = cb[ep->index]; - } - break; - case STAT_DIR_TYPE_NAME_VECTOR: { uint8_t **name_vector = stat_segment_adjust (sm, ep->data); @@ -335,9 +322,6 @@ stat_segment_data_free (stat_segment_data_t * res) vec_free (res[i].name_vector[j]); vec_free (res[i].name_vector); break; - case STAT_DIR_TYPE_ERROR_INDEX: - vec_free (res[i].error_vector); - break; case STAT_DIR_TYPE_SCALAR_INDEX: case STAT_DIR_TYPE_EMPTY: break; diff --git a/src/vpp-api/client/test.c b/src/vpp-api/client/test.c index 9855ffa1880..86d6aef79be 100644 --- a/src/vpp-api/client/test.c +++ b/src/vpp-api/client/test.c @@ -142,7 +142,7 @@ test_stats (void) assert(rv == 0); u32 *dir; - int i, j, k; + int i, k; stat_segment_data_t *res; u8 **pattern = 0; vec_add1(pattern, (u8 *)"/if/names"); @@ -161,11 +161,6 @@ test_stats (void) fformat (stdout, "[%d]: %s %s\n", k, res[i].name_vector[k], res[i].name); break; - case STAT_DIR_TYPE_ERROR_INDEX: - for (j = 0; j < vec_len (res[i].error_vector); j++) - fformat (stdout, "%llu %s\n", res[i].error_vector[j], - res[i].name); - break; default: assert(0); } |