diff options
Diffstat (limited to 'vlib')
-rw-r--r-- | vlib/vlib/threads.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vlib/vlib/threads.c b/vlib/vlib/threads.c index 7b5b8ff0544..dc9b1bbecd7 100644 --- a/vlib/vlib/threads.c +++ b/vlib/vlib/threads.c @@ -1337,6 +1337,8 @@ vlib_worker_thread_internal (vlib_main_t * vm) vlib_node_main_t *nm = &vm->node_main; u64 cpu_time_now = clib_cpu_time_now (); + vec_alloc (nm->pending_interrupt_node_runtime_indices, 32); + while (1) { vlib_worker_thread_barrier_check (); @@ -1351,6 +1353,28 @@ vlib_worker_thread_internal (vlib_main_t * vm) cpu_time_now); } + /* Next handle interrupts. */ + { + uword l = _vec_len (nm->pending_interrupt_node_runtime_indices); + uword i; + if (l > 0) + { + _vec_len (nm->pending_interrupt_node_runtime_indices) = 0; + for (i = 0; i < l; i++) + { + n = vec_elt_at_index (nm->nodes_by_type[VLIB_NODE_TYPE_INPUT], + nm-> + pending_interrupt_node_runtime_indices + [i]); + cpu_time_now = + dispatch_node (vm, n, VLIB_NODE_TYPE_INPUT, + VLIB_NODE_STATE_INTERRUPT, + /* frame */ 0, + cpu_time_now); + } + } + } + if (_vec_len (nm->pending_frames)) { int i; |