summaryrefslogtreecommitdiffstats
path: root/src/vlib/node_funcs.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-04-05 18:15:45 +0200
committerNeale Ranns <nranns@cisco.com>2017-04-10 12:47:33 +0000
commit153646e89c3be70c68348bdd497f8edd2b212a9c (patch)
tree201d82257d82b166fc3003b7f201966b465dd17a /src/vlib/node_funcs.h
parentc3827738daf0955445212ad622e7259ad9480141 (diff)
Common device-input interrupt infra
Change-Id: I23b588eb56a3f5690158449a1f9bc8053cd3d251 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r--src/vlib/node_funcs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index 54e3687443a..4d7cc1928f3 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -177,6 +177,20 @@ vlib_node_set_state (vlib_main_t * vm, u32 node_index,
r->state = new_state;
}
+/** \brief Get node dispatch state.
+ @param vm vlib_main_t pointer, varies by thread
+ @param node_index index of the node
+ @return state for node, see vlib_node_state_t
+*/
+always_inline vlib_node_state_t
+vlib_node_get_state (vlib_main_t * vm, u32 node_index)
+{
+ vlib_node_main_t *nm = &vm->node_main;
+ vlib_node_t *n;
+ n = vec_elt (nm->nodes, node_index);
+ return n->state;
+}
+
always_inline void
vlib_node_set_interrupt_pending (vlib_main_t * vm, u32 node_index)
{