summaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.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/threads.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/threads.c')
-rw-r--r--src/vlib/threads.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index 297c977c464..91125387248 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -1673,6 +1673,7 @@ vlib_frame_queue_dequeue (vlib_main_t * vm, vlib_frame_queue_main_t * fqm)
while (1)
{
+ vlib_buffer_t *b;
if (fq->head == fq->tail)
{
fq->head_hint = fq->head;
@@ -1695,6 +1696,11 @@ vlib_frame_queue_dequeue (vlib_main_t * vm, vlib_frame_queue_main_t * fqm)
f = vlib_get_frame_to_node (vm, fqm->node_index);
+ /* If the first vector is traced, set the frame trace flag */
+ b = vlib_get_buffer (vm, from[0]);
+ if (b->flags & VLIB_BUFFER_IS_TRACED)
+ f->frame_flags |= VLIB_NODE_FLAG_TRACE;
+
to = vlib_frame_vector_args (f);
n_left_to_node = elt->n_vectors;