Add support for input nodes in interrupt mode on the worker threads
Change-Id: Ice2e0e60c801bd6fb67f3a544e95e9ffaa22ca16 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
committed by
Dave Barach
parent
d4024f5862
commit
5d447a9f64
@ -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;
|
||||
|
Reference in New Issue
Block a user