summaryrefslogtreecommitdiffstats
path: root/src/vlib/main.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-01-04 13:19:27 +0100
committerDave Barach <openvpp@barachs.net>2017-01-14 14:17:03 +0000
commit878c609889dcdc58538d40d8b3f662320f88573d (patch)
treefa241dadbdd1db60b47fe3f077ab3392716690d5 /src/vlib/main.c
parenteea28d78a3173341727aafee4c414bcb01001339 (diff)
vlib: add buffer and thread callbacks
Change-Id: I8e2e8f94a884ab2f9909d0c83ba00edd38cdab77 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r--src/vlib/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index 6c6cad98bba..09f34bbd04a 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -465,7 +465,7 @@ vlib_put_next_frame (vlib_main_t * vm,
vlib_frame_t *f;
u32 n_vectors_in_frame;
- if (DPDK == 0 && CLIB_DEBUG > 0)
+ if (vm->buffer_main->extern_buffer_mgmt == 0 && CLIB_DEBUG > 0)
vlib_put_next_frame_validate (vm, r, next_index, n_vectors_left);
nf = vlib_node_runtime_get_next_frame (vm, r, next_index);
@@ -1012,8 +1012,8 @@ dispatch_node (vlib_main_t * vm,
/* When in interrupt mode and vector rate crosses threshold switch to
polling mode. */
- if ((DPDK == 0 && dispatch_state == VLIB_NODE_STATE_INTERRUPT)
- || (DPDK == 0 && dispatch_state == VLIB_NODE_STATE_POLLING
+ if ((dispatch_state == VLIB_NODE_STATE_INTERRUPT)
+ || (dispatch_state == VLIB_NODE_STATE_POLLING
&& (node->flags
& VLIB_NODE_FLAG_SWITCH_FROM_INTERRUPT_TO_POLLING_MODE)))
{
@@ -1615,6 +1615,7 @@ vlib_main (vlib_main_t * volatile vm, unformat_input_t * input)
vm->name = "VLIB";
vec_validate (vm->buffer_main, 0);
+ vlib_buffer_cb_init (vm);
if ((error = vlib_thread_init (vm)))
{