summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2021-10-06 12:54:51 +0000
committerFlorin Coras <florin.coras@gmail.com>2021-10-06 17:58:23 +0000
commit22efac3b537a3a1f0b57d5942bdb78c3190ce858 (patch)
treec5dcc4c8323838fb562568beb2ef663175eae7e2 /src/vnet/session
parent7dd3b5b5e37a4019ae335296ba9c4bd1e465fd17 (diff)
session: fix severity info
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I6548274f8c0ae2a183b1d221cb195de445c2819f
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session_node.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 981fa66eae1..fe4e7324218 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -795,21 +795,21 @@ format_session_queue_trace (u8 * s, va_list * args)
return s;
}
-#define foreach_session_queue_error \
-_(TX, "Packets transmitted") \
-_(TIMER, "Timer events") \
-_(NO_BUFFER, "Out of buffers")
+#define foreach_session_queue_error \
+ _ (TX, tx, INFO, "Packets transmitted") \
+ _ (TIMER, timer, INFO, "Timer events") \
+ _ (NO_BUFFER, no_buffer, ERROR, "Out of buffers")
typedef enum
{
-#define _(sym,str) SESSION_QUEUE_ERROR_##sym,
+#define _(f, n, s, d) SESSION_QUEUE_ERROR_##f,
foreach_session_queue_error
#undef _
SESSION_QUEUE_N_ERROR,
} session_queue_error_t;
-static char *session_queue_error_strings[] = {
-#define _(sym,string) string,
+static vlib_error_desc_t session_error_counters[] = {
+#define _(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s },
foreach_session_queue_error
#undef _
};
@@ -1832,15 +1832,14 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (session_queue_node) =
-{
+VLIB_REGISTER_NODE (session_queue_node) = {
.function = session_queue_node_fn,
.flags = VLIB_NODE_FLAG_TRACE_SUPPORTED,
.name = "session-queue",
.format_trace = format_session_queue_trace,
.type = VLIB_NODE_TYPE_INPUT,
- .n_errors = ARRAY_LEN (session_queue_error_strings),
- .error_strings = session_queue_error_strings,
+ .n_errors = SESSION_QUEUE_N_ERROR,
+ .error_counters = session_error_counters,
.state = VLIB_NODE_STATE_DISABLED,
};
/* *INDENT-ON* */