aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/memif')
-rw-r--r--src/plugins/memif/device.c14
-rw-r--r--src/plugins/memif/node.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c
index 101c3f79426..872660396d0 100644
--- a/src/plugins/memif/device.c
+++ b/src/plugins/memif/device.c
@@ -28,20 +28,20 @@
#include <memif/memif.h>
#include <memif/private.h>
-#define foreach_memif_tx_func_error \
-_(NO_FREE_SLOTS, "no free tx slots") \
-_(ROLLBACK, "no enough space in tx buffers")
+#define foreach_memif_tx_func_error \
+ _ (NO_FREE_SLOTS, no_free_slots, ERROR, "no free tx slots") \
+ _ (ROLLBACK, rollback, ERROR, "no enough space in tx buffers")
typedef enum
{
-#define _(f,s) MEMIF_TX_ERROR_##f,
+#define _(f, n, s, d) MEMIF_TX_ERROR_##f,
foreach_memif_tx_func_error
#undef _
MEMIF_TX_N_ERROR,
} memif_tx_func_error_t;
-static char *memif_tx_func_error_strings[] = {
-#define _(n,s) s,
+static vl_counter_t memif_tx_func_error_counters[] = {
+#define _(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s },
foreach_memif_tx_func_error
#undef _
};
@@ -490,7 +490,7 @@ VNET_DEVICE_CLASS (memif_device_class) = {
.format_device = format_memif_device,
.format_tx_trace = format_memif_tx_trace,
.tx_function_n_errors = MEMIF_TX_N_ERROR,
- .tx_function_error_strings = memif_tx_func_error_strings,
+ .tx_function_error_counters = memif_tx_func_error_counters,
.rx_redirect_to_node = memif_set_interface_next_node,
.clear_counters = memif_clear_hw_interface_counters,
.admin_up_down_function = memif_interface_admin_up_down,
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* */