return n->state;
}
+always_inline void
+vlib_node_set_flag (vlib_main_t *vm, u32 node_index, u16 flag, u8 enable)
+{
+ vlib_node_runtime_t *r;
+ vlib_node_t *n;
+
+ n = vlib_get_node (vm, node_index);
+ r = vlib_node_get_runtime (vm, node_index);
+
+ if (enable)
+ {
+ n->flags |= flag;
+ r->flags |= flag;
+ }
+ else
+ {
+ n->flags &= ~flag;
+ r->flags &= ~flag;
+ }
+}
+
always_inline void
vlib_node_set_interrupt_pending (vlib_main_t *vm, u32 node_index)
{
if (!data_vec && vec_len (nm->recycled_event_data_vectors))
{
data_vec = vec_pop (nm->recycled_event_data_vectors);
- _vec_len (data_vec) = 0;
+ vec_reset_length (data_vec);
}
l = vec_len (data_vec);
/* Sync up runtime and main node stats. */
void vlib_node_sync_stats (vlib_main_t * vm, vlib_node_t * n);
+void vlib_node_runtime_sync_stats (vlib_main_t *vm, vlib_node_runtime_t *r,
+ uword n_calls, uword n_vectors,
+ uword n_clocks);
+void vlib_node_runtime_sync_stats_node (vlib_node_t *n, vlib_node_runtime_t *r,
+ uword n_calls, uword n_vectors,
+ uword n_clocks);
/* Node graph initialization function. */
clib_error_t *vlib_node_main_init (vlib_main_t * vm);