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
- vlib_mains[next_thread_index]->check_frame_queues = 1;
if (hf)
hf->n_vectors = VLIB_FRAME_SIZE - n_left_to_next_thread;
if (hf)
hf->n_vectors = VLIB_FRAME_SIZE - n_left_to_next_thread;
{
hf->n_vectors = VLIB_FRAME_SIZE;
vlib_put_frame_queue_elt (hf);
{
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;
current_thread_index = ~0;
ptd->handoff_queue_elt_by_thread_index[next_thread_index] = 0;
hf = 0;
if (1 || hf->n_vectors == hf->last_n_vectors)
{
vlib_put_frame_queue_elt (hf);
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
ptd->handoff_queue_elt_by_thread_index[i] = 0;
}
else