aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/main.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-06-21 18:24:07 -0400
committerNeale Ranns <nranns@cisco.com>2019-06-24 17:13:24 +0000
commita638c18375f17891a9455e717d8436158af12387 (patch)
treec2c1528169595172372a45aa0025c033c1ecea13 /src/vlib/main.c
parent21b83e96d6076cda01ee80343840bc1166557150 (diff)
vlib: packet tracer support for pkt thread handoffs
Type: feature Change-Id: Ia3d9a47679202c2a47cd3746b50e86c6b8627ef6 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r--src/vlib/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index 43400f8594c..3c0e754169f 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -1019,8 +1019,8 @@ format_buffer_metadata (u8 * s, va_list * args)
(u32) (b->error), (u32) (b->ref_count),
(u32) (b->buffer_pool_index));
s = format (s,
- "trace_index: %d, len_not_first_buf: %d\n",
- b->trace_index, b->total_length_not_including_first_buffer);
+ "trace_handle: 0x%x, len_not_first_buf: %d\n",
+ b->trace_handle, b->total_length_not_including_first_buffer);
return s;
}
@@ -1091,7 +1091,8 @@ dispatch_pcap_trace (vlib_main_t * vm,
if (PREDICT_FALSE (b->flags & VLIB_BUFFER_IS_TRACED))
{
vlib_trace_header_t **h
- = pool_elt_at_index (tm->trace_buffer_pool, b->trace_index);
+ = pool_elt_at_index (tm->trace_buffer_pool,
+ vlib_buffer_get_trace_index (b));
vm->pcap_buffer = format (vm->pcap_buffer, "%U%c",
format_vlib_trace, vm, h[0], 0);