summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-11-08 08:22:28 -0500
committerDamjan Marion <dmarion@me.com>2019-11-11 19:03:15 +0000
commit320998a8126766c0db92d9c7652f765f9565a7b5 (patch)
tree91c4de87b5812dd302f056d5e5843bce32bf7112 /src/vlib
parentb3dce89a768aaffa2a830ba6579cd3d9c8cd967a (diff)
vlib: fix handoff queue sequencing bug
Set vm->check_frame_queues after actually enqueuing a frame. Under obscure circumstances, the code managed to set check_frame_queues so far in advance that 100 dispatch cycles could elapse before the frame enqueue succeeded. That resulted in permanent lack of queue service. Type: fix Ticket: VPP-1734 Fixes: 18191 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: If2d398202b4ba2b96581d25e8142daef3f74c9e5
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/buffer_node.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlib/buffer_node.h b/src/vlib/buffer_node.h
index 5ded5066563..96b50ae3551 100644
--- a/src/vlib/buffer_node.h
+++ b/src/vlib/buffer_node.h
@@ -517,7 +517,6 @@ vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
n_drop++;
goto next;
}
- vlib_mains[next_thread_index]->check_frame_queues = 1;
if (hf)
hf->n_vectors = VLIB_FRAME_SIZE - n_left_to_next_thread;
@@ -539,6 +538,7 @@ vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
{
hf->n_vectors = VLIB_FRAME_SIZE;
vlib_put_frame_queue_elt (hf);
+ vlib_mains[current_thread_index]->check_frame_queues = 1;
current_thread_index = ~0;
ptd->handoff_queue_elt_by_thread_index[next_thread_index] = 0;
hf = 0;
@@ -567,6 +567,7 @@ vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
if (1 || hf->n_vectors == hf->last_n_vectors)
{
vlib_put_frame_queue_elt (hf);
+ vlib_mains[i]->check_frame_queues = 1;
ptd->handoff_queue_elt_by_thread_index[i] = 0;
}
else