diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vlib/threads.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c index 270ccc325ba..ecca7e3ea52 100644 --- a/src/vlib/threads.c +++ b/src/vlib/threads.c @@ -707,16 +707,15 @@ start_workers (vlib_main_t * vm) clib_callback_data_init (&vm->vlib_node_runtime_perf_callbacks, &vm->worker_thread_main_loop_callback_lock); - if (n_vlib_mains > 1) - { - /* Replace hand-crafted length-1 vector with a real vector */ - vlib_mains = 0; + /* Replace hand-crafted length-1 vector with a real vector */ + vlib_mains = 0; - vec_validate_aligned (vlib_mains, tm->n_vlib_mains - 1, - CLIB_CACHE_LINE_BYTES); - _vec_len (vlib_mains) = 0; - vec_add1_aligned (vlib_mains, vm, CLIB_CACHE_LINE_BYTES); + vec_validate_aligned (vlib_mains, n_vlib_mains - 1, CLIB_CACHE_LINE_BYTES); + _vec_len (vlib_mains) = 0; + vec_add1_aligned (vlib_mains, vm, CLIB_CACHE_LINE_BYTES); + if (n_vlib_mains > 1) + { vlib_worker_threads->wait_at_barrier = clib_mem_alloc_aligned (sizeof (u32), CLIB_CACHE_LINE_BYTES); vlib_worker_threads->workers_at_barrier = |