X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp_syn_filter4.c;h=1b003e04e51bb0e6a0e15a7db807bfff084b8d00;hb=0c4931cb351929a1ccdb6b29431def3705f101d7;hp=ef7a3280c0367a64edfd99060bcc49937ed7d3f1;hpb=5e6a1651c4759eac56a0409a75e6d3b75511d234;p=vpp.git 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,