aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp_local.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2021-10-06 12:48:34 +0000
committerFlorin Coras <florin.coras@gmail.com>2021-10-07 15:34:31 +0000
commit0c56217a307556524cfc92a1aeb1eb72112271d2 (patch)
tree811e8724ac4dbee01249437e26830ff59057d697 /src/vnet/udp/udp_local.c
parent43289951b23e491510baf1cedfad884321e83c30 (diff)
udp: fix severity error info
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I415d68b39ecac546b531f6eb98bca51e7eb6f7f7
Diffstat (limited to 'src/vnet/udp/udp_local.c')
-rw-r--r--src/vnet/udp/udp_local.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vnet/udp/udp_local.c b/src/vnet/udp/udp_local.c
index edfec3359c3..06bafbb4be8 100644
--- a/src/vnet/udp/udp_local.c
+++ b/src/vnet/udp/udp_local.c
@@ -36,6 +36,12 @@ typedef struct
u8 bound;
} udp_local_rx_trace_t;
+static vlib_error_desc_t udp_error_counters[] = {
+#define udp_error(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s },
+#include "udp_error.def"
+#undef udp_error
+};
+
#define UDP_NO_NODE_SET ((u16) ~0)
#ifndef CLIB_MARCH_VARIANT
@@ -342,12 +348,6 @@ udp46_local_inline (vlib_main_t * vm,
return from_frame->n_vectors;
}
-static char *udp_error_strings[] = {
-#define udp_error(n,s) s,
-#include "udp_error.def"
-#undef udp_error
-};
-
VLIB_NODE_FN (udp4_local_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * from_frame)
@@ -369,7 +369,7 @@ VLIB_REGISTER_NODE (udp4_local_node) = {
.vector_size = sizeof (u32),
.n_errors = UDP_N_ERROR,
- .error_strings = udp_error_strings,
+ .error_counters = udp_error_counters,
.n_next_nodes = UDP_LOCAL_N_NEXT,
.next_nodes = {
@@ -391,7 +391,7 @@ VLIB_REGISTER_NODE (udp6_local_node) = {
.vector_size = sizeof (u32),
.n_errors = UDP_N_ERROR,
- .error_strings = udp_error_strings,
+ .error_counters = udp_error_counters,
.n_next_nodes = UDP_LOCAL_N_NEXT,
.next_nodes = {