diff options
author | Neale Ranns <neale@graphiant.com> | 2022-08-09 03:03:29 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2022-08-11 06:54:16 +0000 |
commit | e22a7041626cf1ebee7534d84068d48e8671a6ab (patch) | |
tree | dc3a7f46c3a4aef4c3af20229d3df18fb5465f8a /src/vnet/ip/reass/ip6_full_reass.c | |
parent | 93688d7341ada44755dc0432de3e3dbaaa8aa111 (diff) |
ip: Use .api declared error counters
Type: improvement
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I822ead1495edb96ee62e53dc5920aa6c565e3621
Diffstat (limited to 'src/vnet/ip/reass/ip6_full_reass.c')
-rw-r--r-- | src/vnet/ip/reass/ip6_full_reass.c | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c index 74193346c20..97815572ee2 100644 --- a/src/vnet/ip/reass/ip6_full_reass.c +++ b/src/vnet/ip/reass/ip6_full_reass.c @@ -1448,12 +1448,6 @@ ip6_full_reassembly_inline (vlib_main_t *vm, vlib_node_runtime_t *node, return frame->n_vectors; } -static char *ip6_full_reassembly_error_strings[] = { -#define _(sym, string) string, - foreach_ip6_error -#undef _ -}; - VLIB_NODE_FN (ip6_full_reass_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) @@ -1467,8 +1461,8 @@ VLIB_REGISTER_NODE (ip6_full_reass_node) = { .name = "ip6-full-reassembly", .vector_size = sizeof (u32), .format_trace = format_ip6_full_reass_trace, - .n_errors = ARRAY_LEN (ip6_full_reassembly_error_strings), - .error_strings = ip6_full_reassembly_error_strings, + .n_errors = IP6_N_ERROR, + .error_counters = ip6_error_counters, .n_next_nodes = IP6_FULL_REASSEMBLY_N_NEXT, .next_nodes = { @@ -1491,8 +1485,8 @@ VLIB_REGISTER_NODE (ip6_local_full_reass_node) = { .name = "ip6-local-full-reassembly", .vector_size = sizeof (u32), .format_trace = format_ip6_full_reass_trace, - .n_errors = ARRAY_LEN (ip6_full_reassembly_error_strings), - .error_strings = ip6_full_reassembly_error_strings, + .n_errors = IP6_N_ERROR, + .error_counters = ip6_error_counters, .n_next_nodes = IP6_FULL_REASSEMBLY_N_NEXT, .next_nodes = { @@ -1516,8 +1510,8 @@ VLIB_REGISTER_NODE (ip6_full_reass_node_feature) = { .name = "ip6-full-reassembly-feature", .vector_size = sizeof (u32), .format_trace = format_ip6_full_reass_trace, - .n_errors = ARRAY_LEN (ip6_full_reassembly_error_strings), - .error_strings = ip6_full_reassembly_error_strings, + .n_errors = IP6_N_ERROR, + .error_counters = ip6_error_counters, .n_next_nodes = IP6_FULL_REASSEMBLY_N_NEXT, .next_nodes = { @@ -1548,8 +1542,8 @@ VLIB_REGISTER_NODE (ip6_full_reass_node_custom) = { .name = "ip6-full-reassembly-custom", .vector_size = sizeof (u32), .format_trace = format_ip6_full_reass_trace, - .n_errors = ARRAY_LEN (ip6_full_reassembly_error_strings), - .error_strings = ip6_full_reassembly_error_strings, + .n_errors = IP6_N_ERROR, + .error_counters = ip6_error_counters, .n_next_nodes = IP6_FULL_REASSEMBLY_N_NEXT, .next_nodes = { @@ -1851,14 +1845,13 @@ ip6_full_reass_walk_expired (vlib_main_t *vm, vlib_node_runtime_t *node, } VLIB_REGISTER_NODE (ip6_full_reass_expire_node) = { - .function = ip6_full_reass_walk_expired, - .format_trace = format_ip6_full_reass_trace, - .type = VLIB_NODE_TYPE_PROCESS, - .name = "ip6-full-reassembly-expire-walk", - - .n_errors = ARRAY_LEN (ip6_full_reassembly_error_strings), - .error_strings = ip6_full_reassembly_error_strings, + .function = ip6_full_reass_walk_expired, + .format_trace = format_ip6_full_reass_trace, + .type = VLIB_NODE_TYPE_PROCESS, + .name = "ip6-full-reassembly-expire-walk", + .n_errors = IP6_N_ERROR, + .error_counters = ip6_error_counters, }; static u8 * |