From 0c4931cb351929a1ccdb6b29431def3705f101d7 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Wed, 6 Oct 2021 09:47:41 +0000 Subject: tcp: fix severity info Type: fix Signed-off-by: Filip Tehlar Signed-off-by: Florin Coras Change-Id: Ibe39bc045c3b154209a83b59ef95a37c61b32c0c --- src/vnet/tcp/tcp_syn_filter4.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/vnet/tcp/tcp_syn_filter4.c') diff --git a/src/vnet/tcp/tcp_syn_filter4.c b/src/vnet/tcp/tcp_syn_filter4.c index ef7a3280c03..1b003e04e51 100644 --- a/src/vnet/tcp/tcp_syn_filter4.c +++ b/src/vnet/tcp/tcp_syn_filter4.c @@ -54,20 +54,20 @@ format_syn_filter4_trace (u8 * s, va_list * args) extern vlib_node_registration_t syn_filter4_node; -#define foreach_syn_filter_error \ -_(THROTTLED, "TCP SYN packet throttle drops") \ -_(OK, "TCP SYN packets passed") +#define foreach_syn_filter_error \ + _ (THROTTLED, throttled, ERROR, "TCP SYN packet throttle drops") \ + _ (OK, ok, INFO, "TCP SYN packets passed") typedef enum { -#define _(sym,str) SYN_FILTER_ERROR_##sym, +#define _(f, n, s, d) SYN_FILTER_ERROR_##f, foreach_syn_filter_error #undef _ SYN_FILTER_N_ERROR, } syn_filter_error_t; -static char *syn_filter4_error_strings[] = { -#define _(sym,string) string, +static vlib_error_desc_t tcp_syn_error_counters[] = { +#define _(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s }, foreach_syn_filter_error #undef _ }; @@ -408,8 +408,8 @@ VLIB_REGISTER_NODE (syn_filter4_node) = .type = VLIB_NODE_TYPE_INTERNAL, .runtime_data_bytes = sizeof (syn_filter4_runtime_t), - .n_errors = ARRAY_LEN(syn_filter4_error_strings), - .error_strings = syn_filter4_error_strings, + .n_errors = SYN_FILTER_N_ERROR, + .error_counters = tcp_syn_error_counters, .n_next_nodes = SYN_FILTER_N_NEXT, -- cgit 1.2.3-korg