summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/memif/node.c')
-rw-r--r--src/plugins/memif/node.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c
index b2422f9e323..84bc63fc7c3 100644
--- a/src/plugins/memif/node.c
+++ b/src/plugins/memif/node.c
@@ -31,20 +31,20 @@
#include <memif/private.h>
#define foreach_memif_input_error \
- _ (BUFFER_ALLOC_FAIL, "buffer allocation failed") \
- _ (BAD_DESC, "bad descriptor") \
- _ (NOT_IP, "not ip packet")
+ _ (BUFFER_ALLOC_FAIL, buffer_alloc, ERROR, "buffer allocation failed") \
+ _ (BAD_DESC, bad_desc, ERROR, "bad descriptor") \
+ _ (NOT_IP, not_ip, INFO, "not ip packet")
typedef enum
{
-#define _(f,s) MEMIF_INPUT_ERROR_##f,
+#define _(f, n, s, d) MEMIF_INPUT_ERROR_##f,
foreach_memif_input_error
#undef _
MEMIF_INPUT_N_ERROR,
} memif_input_error_t;
-static __clib_unused char *memif_input_error_strings[] = {
-#define _(n,s) s,
+static vl_counter_t memif_input_error_counters[] = {
+#define _(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s },
foreach_memif_input_error
#undef _
};
@@ -937,7 +937,7 @@ VLIB_REGISTER_NODE (memif_input_node) = {
.type = VLIB_NODE_TYPE_INPUT,
.state = VLIB_NODE_STATE_INTERRUPT,
.n_errors = MEMIF_INPUT_N_ERROR,
- .error_strings = memif_input_error_strings,
+ .error_counters = memif_input_error_counters,
};
/* *INDENT-ON* */