diff options
author | Benoît Ganne <bganne@cisco.com> | 2020-06-30 18:17:06 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-07-01 20:39:01 +0000 |
commit | d25147d58117a573fd2fc04cdfa76339fa1cdf22 (patch) | |
tree | 0e44628d9499f7d45a8aa0944cc4847e137f90d6 /src/vlib/main.c | |
parent | 126c88544103d3775252f741398111875f6a62d7 (diff) |
vlib: wake up workers if interrupts are posted
Type: fix
Change-Id: If8dbbcb46193fd057fe8d704058609a3a8787d6c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r-- | src/vlib/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c index 2c397a29672..8d7c6c09275 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -1766,6 +1766,8 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) /* Pre-allocate interupt runtime indices and lock. */ vec_alloc (nm->pending_local_interrupts, 32); vec_alloc (nm->pending_remote_interrupts, 32); + vec_alloc_aligned (nm->pending_remote_interrupts_notify, 1, + CLIB_CACHE_LINE_BYTES); clib_spinlock_init (&nm->pending_interrupt_lock); /* Pre-allocate expired nodes. */ @@ -1857,7 +1859,7 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) cpu_time_now = dispatch_pending_interrupts (vm, nm, cpu_time_now); /* handle remote interruots */ - if (_vec_len (nm->pending_remote_interrupts)) + if (PREDICT_FALSE (_vec_len (nm->pending_remote_interrupts))) { vlib_node_interrupt_t *in; @@ -1868,6 +1870,7 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) in = nm->pending_local_interrupts; nm->pending_local_interrupts = nm->pending_remote_interrupts; nm->pending_remote_interrupts = in; + *nm->pending_remote_interrupts_notify = 0; clib_spinlock_unlock (&nm->pending_interrupt_lock); cpu_time_now = dispatch_pending_interrupts (vm, nm, cpu_time_now); |