X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fvmxnet3%2Finput.c;h=bed4c1e3292d863d784eee5a234ab89a7ad13a28;hb=9a3973e3a36bfd4dd8dbffe130a92649fc1b73d3;hp=f182409ac593a106f8ab4af2e511d9c733ed5099;hpb=f6b02e0d0bfd7e0f1d79e8ee426f48ca37ae5ff3;p=vpp.git diff --git a/src/plugins/vmxnet3/input.c b/src/plugins/vmxnet3/input.c index f182409ac59..bed4c1e3292 100644 --- a/src/plugins/vmxnet3/input.c +++ b/src/plugins/vmxnet3/input.c @@ -418,17 +418,18 @@ vmxnet3_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, next = nexts; while (n_trace && n_left) { - vlib_buffer_t *b; - vmxnet3_input_trace_t *tr; - - b = vlib_get_buffer (vm, bi[0]); - vlib_trace_buffer (vm, node, next[0], b, /* follow_chain */ 0); - tr = vlib_add_trace (vm, node, b, sizeof (*tr)); - tr->next_index = next[0]; - tr->hw_if_index = vd->hw_if_index; - tr->buffer = *b; - - n_trace--; + vlib_buffer_t *b = vlib_get_buffer (vm, bi[0]); + if (PREDICT_TRUE + (vlib_trace_buffer + (vm, node, next[0], b, /* follow_chain */ 0))) + { + vmxnet3_input_trace_t *tr = + vlib_add_trace (vm, node, b, sizeof (*tr)); + tr->next_index = next[0]; + tr->hw_if_index = vd->hw_if_index; + tr->buffer = *b; + n_trace--; + } n_left--; bi++; next++;