summaryrefslogtreecommitdiffstats
path: root/src/vlib/node_funcs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r--src/vlib/node_funcs.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index a1fca14faad..66f079c0547 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -252,15 +252,21 @@ vlib_node_set_interrupt_pending (vlib_main_t *vm, u32 node_index)
{
vlib_node_main_t *nm = &vm->node_main;
vlib_node_t *n = vec_elt (nm->nodes, node_index);
+ void *interrupts;
- ASSERT (n->type == VLIB_NODE_TYPE_INPUT);
+ if (n->type == VLIB_NODE_TYPE_INPUT)
+ interrupts = nm->input_node_interrupts;
+ else if (n->type == VLIB_NODE_TYPE_PRE_INPUT)
+ interrupts = nm->pre_input_node_interrupts;
+ else
+ ASSERT (0);
if (vm != vlib_get_main ())
- clib_interrupt_set_atomic (nm->interrupts, n->runtime_index);
+ clib_interrupt_set_atomic (interrupts, n->runtime_index);
else
- clib_interrupt_set (nm->interrupts, n->runtime_index);
+ clib_interrupt_set (interrupts, n->runtime_index);
- __atomic_store_n (nm->pending_interrupts, 1, __ATOMIC_RELEASE);
+ __atomic_store_n (&nm->pending_interrupts, 1, __ATOMIC_RELEASE);
}
always_inline vlib_process_t *