summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-03-14 11:10:00 +0100
committerDave Barach <openvpp@barachs.net>2017-03-14 12:03:07 +0000
commit20e272c8fce5571122ca149526ee8ddf6f43ee3f (patch)
tree72dcc2ef6605f613fc317f3b52ab64834fd1c5d6
parent6e28f382e8329743292f8831c6a9fcf8e067068c (diff)
vlib: poll pre_input nodes only on main thread
Change-Id: I61464fd1610a9754693f31edd72f9fa1b6926511 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/vlib/main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index 917607067eb..58e88fccc4a 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -1468,12 +1468,13 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
}
/* Process pre-input nodes. */
- vec_foreach (n, nm->nodes_by_type[VLIB_NODE_TYPE_PRE_INPUT])
- cpu_time_now = dispatch_node (vm, n,
- VLIB_NODE_TYPE_PRE_INPUT,
- VLIB_NODE_STATE_POLLING,
- /* frame */ 0,
- cpu_time_now);
+ if (is_main)
+ vec_foreach (n, nm->nodes_by_type[VLIB_NODE_TYPE_PRE_INPUT])
+ cpu_time_now = dispatch_node (vm, n,
+ VLIB_NODE_TYPE_PRE_INPUT,
+ VLIB_NODE_STATE_POLLING,
+ /* frame */ 0,
+ cpu_time_now);
/* Next process input nodes. */
vec_foreach (n, nm->nodes_by_type[VLIB_NODE_TYPE_INPUT])