summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_forward.c
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2022-08-09 03:03:29 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-08-11 06:54:16 +0000
commite22a7041626cf1ebee7534d84068d48e8671a6ab (patch)
treedc3a7f46c3a4aef4c3af20229d3df18fb5465f8a /src/vnet/ip/ip6_forward.c
parent93688d7341ada44755dc0432de3e3dbaaa8aa111 (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/ip6_forward.c')
-rw-r--r--src/vnet/ip/ip6_forward.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index 44b0052225b..84ea5a068aa 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1319,7 +1319,7 @@ ip6_local_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
vlib_prefetch_buffer_data (b[3], LOAD);
}
- ip6_error_t error[2];
+ vl_counter_ip6_enum_t error[2];
error[0] = IP6_ERROR_UNKNOWN_PROTOCOL;
error[1] = IP6_ERROR_UNKNOWN_PROTOCOL;
@@ -1671,6 +1671,8 @@ VLIB_REGISTER_NODE (ip6_local_node) =
.name = "ip6-local",
.vector_size = sizeof (u32),
.format_trace = format_ip6_forward_next_trace,
+ .n_errors = IP6_N_ERROR,
+ .error_counters = ip6_error_counters,
.n_next_nodes = IP_LOCAL_N_NEXT,
.next_nodes =
{
@@ -2242,19 +2244,20 @@ VLIB_NODE_FN (ip6_mcast_midchain_node) (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (ip6_midchain_node) =
-{
+VLIB_REGISTER_NODE (ip6_midchain_node) = {
.name = "ip6-midchain",
.vector_size = sizeof (u32),
.format_trace = format_ip6_forward_next_trace,
.sibling_of = "ip6-rewrite",
- };
+};
VLIB_REGISTER_NODE (ip6_rewrite_node) =
{
.name = "ip6-rewrite",
.vector_size = sizeof (u32),
.format_trace = format_ip6_rewrite_trace,
+ .n_errors = IP6_N_ERROR,
+ .error_counters = ip6_error_counters,
.n_next_nodes = IP6_REWRITE_N_NEXT,
.next_nodes =
{