X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fspan%2Fnode.c;h=8e2105bcc82a4c21226ffbf41bdb7e206bd3fe81;hb=a43ccaefc3bd50c03c90f7c3bee02eac9709df56;hp=9d83d4ef288fe2ff445e6a0208ea2f31770abdc1;hpb=5fda7a3925be145f0c326d0aecc36d883cbcb2ee;p=vpp.git diff --git a/src/vnet/span/node.c b/src/vnet/span/node.c index 9d83d4ef288..8e2105bcc82 100644 --- a/src/vnet/span/node.c +++ b/src/vnet/span/node.c @@ -87,7 +87,8 @@ span_mirror (vlib_main_t * vm, vlib_node_runtime_t * node, u32 sw_if_index0, if (mirror_frames[i] == 0) { if (sf == SPAN_FEAT_L2) - mirror_frames[i] = vlib_get_frame_to_node (vnm->vlib_main, l2output_node.index); + mirror_frames[i] = vlib_get_frame_to_node (vnm->vlib_main, + l2output_node.index); else mirror_frames[i] = vnet_get_frame_to_sw_interface (vnm, i); } @@ -108,8 +109,16 @@ span_mirror (vlib_main_t * vm, vlib_node_runtime_t * node, u32 sw_if_index0, span_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); t->src_sw_if_index = sw_if_index0; t->mirror_sw_if_index = i; - } - } +#if 0 + /* Enable this path to allow packet trace of SPAN packets. + Note that all SPAN packets will show up on the trace output + with the first SPAN packet (since they are in the same frame) + thus making trace output of the original packet confusing */ + mirror_frames[i]->flags |= VLIB_FRAME_TRACE; + c0->flags |= VLIB_BUFFER_IS_TRACED; +#endif + } + } })); /* *INDENT-ON* */ }