vlib: Skip core 0 if workers are configured. 18/28318/1
authorJon Loeliger <jdl@netgate.com>
Fri, 31 Jan 2020 19:34:56 +0000 (13:34 -0600)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 12 Aug 2020 15:59:46 +0000 (15:59 +0000)
commit954c0bb0cf5735e2506d5bbaa967d81902f56007
tree2c1e9daa69a902a9ff90030a4515269b75880379
parentfe7690230ac03991e3e7aa863164f923e5619218
vlib: Skip core 0 if workers are configured.

According to the description in the startup.conf, the assignment
of worker threads starts with the lcore following the main_lcore.
A non-zero skip_cores will correctly achieve this assignment.
However, prior to this patch when workers are assigned, the code
picks up and assigns core 0 even thought it shouldn't.
This patch determins if a non-zero number of workers are desired
and if so, marks CPU unavailable for a worker assignment.

Type: fix

Change-Id: I1fdf73a6f218dcbf146fda2efc90c553f7cd6d20
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 4a06846dd668d7f687e6770215c38e8feb5f1740)
src/vlib/threads.c