X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlib%2Fmain.c;h=50f0b1626c0a43d7a5972f06e35ae617188c9360;hb=7312cc7785a9d1198519e1091a645fecc019a6b8;hp=605771c89c28905a0dea8b2e74bf7ae57428ede9;hpb=b616e9fdc270e786c31b9ee9de5464497f0b1f6d;p=vpp.git diff --git a/src/vlib/main.c b/src/vlib/main.c index 605771c89c2..50f0b1626c0 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -1032,15 +1032,14 @@ dispatch_node (vlib_main_t * vm, vlib_worker_thread_t *w = vlib_worker_threads + vm->cpu_index; #endif - if (dispatch_state == VLIB_NODE_STATE_INTERRUPT - && v >= nm->polling_threshold_vector_length) + if ((dispatch_state == VLIB_NODE_STATE_INTERRUPT + && v >= nm->polling_threshold_vector_length) && + !(node->flags & + VLIB_NODE_FLAG_SWITCH_FROM_INTERRUPT_TO_POLLING_MODE)) { vlib_node_t *n = vlib_get_node (vm, node->node_index); n->state = VLIB_NODE_STATE_POLLING; node->state = VLIB_NODE_STATE_POLLING; - ASSERT (! - (node->flags & - VLIB_NODE_FLAG_SWITCH_FROM_INTERRUPT_TO_POLLING_MODE)); node->flags &= ~VLIB_NODE_FLAG_SWITCH_FROM_POLLING_TO_INTERRUPT_MODE; node->flags |= @@ -1445,6 +1444,10 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) /* Pre-allocate expired nodes. */ vec_alloc (nm->pending_interrupt_node_runtime_indices, 32); + if (!nm->polling_threshold_vector_length) + nm->polling_threshold_vector_length = 10; + if (!nm->interrupt_threshold_vector_length) + nm->interrupt_threshold_vector_length = 5; if (is_main) {