X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fpunt_node.c;h=90953e63704f7d40a9cff3c5241652b780d516f4;hb=9a3973e3a36bfd4dd8dbffe130a92649fc1b73d3;hp=8a39d118a81b4256d7d4656ebe03c00a32265bf5;hpb=43ba29267b1f1db04cba0af1f994a5c8477ca870;p=vpp.git diff --git a/src/vnet/ip/punt_node.c b/src/vnet/ip/punt_node.c index 8a39d118a81..90953e63704 100644 --- a/src/vnet/ip/punt_node.c +++ b/src/vnet/ip/punt_node.c @@ -24,9 +24,6 @@ #include #include -#include -#include -#include #include #include @@ -576,10 +573,11 @@ punt_socket_rx_fd (vlib_main_t * vm, vlib_node_runtime_t * node, u32 fd) goto error; } - if (PREDICT_FALSE (n_trace > 0)) + if (PREDICT_FALSE + (n_trace > 0 + && vlib_trace_buffer (vm, node, next_index, b, 1 /* follow_chain */ ))) { punt_trace_t *t; - vlib_trace_buffer (vm, node, next_index, b, 1 /* follow_chain */ ); vlib_set_trace_count (vm, node, --n_trace); t = vlib_add_trace (vm, node, b, sizeof (*t)); t->sw_if_index = packetdesc.sw_if_index; @@ -593,9 +591,11 @@ punt_socket_rx_fd (vlib_main_t * vm, vlib_node_runtime_t * node, u32 fd) vlib_validate_buffer_enqueue_x1 (vm, node, next, to_next, n_left_to_next, bi, next_index); vlib_put_next_frame (vm, node, next, n_left_to_next); + return 1; error: + vlib_put_next_frame (vm, node, next, n_left_to_next); vlib_node_increment_counter (vm, punt_socket_rx_node.index, error, 1); return 0; } @@ -621,6 +621,7 @@ VLIB_REGISTER_NODE (punt_socket_rx_node) = { .function = punt_socket_rx, .name = "punt-socket-rx", + .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, .type = VLIB_NODE_TYPE_INPUT, .state = VLIB_NODE_STATE_INTERRUPT, .vector_size = 1,