aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/main.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-01-19 20:56:12 +0100
committerDave Barach <openvpp@barachs.net>2018-02-06 18:17:46 +0000
commitceab7882f8016c2407a4383f87277bad069885b1 (patch)
treee90e247184d9dc3086b6f11f25dff8bd6e7ce51e /src/vlib/main.c
parentdf5a99cef13ff6a22c195091be45152dc65f5d71 (diff)
vlib: epoll on worker threads
This patch teaches worer threads to sleep and to be waken up by kernel if there is activity on file desctiptors assigned to that thread. It also adds counters to epoll file descriptors and new debug cli 'show unix file'. Change-Id: Iaf67869f4aa88ff5b0a08982e1c08474013107c4 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r--src/vlib/main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index f915aa41b3b..5efeac26f79 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -1493,13 +1493,12 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
}
/* Process pre-input nodes. */
- 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);
+ 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])