summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2019-08-13 18:18:21 -0400
committerJohn Lo <loj@cisco.com>2019-08-15 15:26:46 -0400
commita5766fe1397103cee73b764181df63fdd68ef040 (patch)
treed8e918643d80918b7d6329174a0ab1a36962948a /src/vnet/l2
parent4c945dacb9ff9da731301feb26b1edb4ac00e8bd (diff)
vlib: copy trace_handle in vlib_buffer_copy/clone() functions
Since vlib_buffer_copy() and vlib_buffer_clone() both preserve VLIB_BUFFER_IS_TRACED bit in flags field, it should also copy trace_handle which would add minimal overhead. Thus, callers of these functions do not have to call vlib_buffer_copy_trace_flags() to copy trace_handle. Type: refactor Ticket: VPP-1745 Signed-off-by: John Lo <loj@cisco.com> Change-Id: Iff6a3f81660dd62b36a2966033eb380305340310 (cherry picked from commit 6631780422787166550b9871c46a94c160416324) Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vnet/l2')
-rw-r--r--src/vnet/l2/l2_flood.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/vnet/l2/l2_flood.c b/src/vnet/l2/l2_flood.c
index 1bc528138d7..8d34233b520 100644
--- a/src/vnet/l2/l2_flood.c
+++ b/src/vnet/l2/l2_flood.c
@@ -250,9 +250,6 @@ VLIB_NODE_FN (l2flood_node) (vlib_main_t * vm,
ethernet_header_t *h0;
l2flood_trace_t *t;
- if (c0 != b0)
- vlib_buffer_copy_trace_flag (vm, b0, ci0);
-
t = vlib_add_trace (vm, node, c0, sizeof (*t));
h0 = vlib_buffer_get_current (c0);
t->sw_if_index = sw_if_index0;
@@ -301,9 +298,6 @@ VLIB_NODE_FN (l2flood_node) (vlib_main_t * vm,
ethernet_header_t *h0;
l2flood_trace_t *t;
- if (c0 != b0)
- vlib_buffer_copy_trace_flag (vm, b0, ci0);
-
t = vlib_add_trace (vm, node, c0, sizeof (*t));
h0 = vlib_buffer_get_current (c0);
t->sw_if_index = sw_if_index0;