ethernet: fix packet tracing 93/18793/3
authorBenoît Ganne <bganne@cisco.com>
Wed, 10 Apr 2019 12:21:11 +0000 (14:21 +0200)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 10 Apr 2019 18:08:49 +0000 (18:08 +0000)
Node tracing condition was wrongly reversed by commit "5ecd5a5d15 Move
pcap rx/tx trace code out of the dpdk plugin".
This prevented packet tracing in ethernet-input node and also impacted
performance in the no tracing case.

Change-Id: I345a11191d027c6c4ec474a2901995338050680a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vnet/ethernet/node.c

index 950a962..38c596e 100755 (executable)
@@ -963,7 +963,7 @@ ethernet_input_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
                      vlib_frame_t * from_frame)
 {
   u32 *from, n_left;
-  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) == 0))
+  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
     {
       from = vlib_frame_vector_args (from_frame);
       n_left = from_frame->n_vectors;