summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-07-03 22:24:32 +0200
committerDamjan Marion <dmarion@me.com>2018-07-04 12:52:08 +0000
commit9e300dda1b6227c0c67aeafee4d381f06076729c (patch)
treeb63c38e6e3092675cbc1d2c917d422c65229875b
parent1f046dc117f10fe11d83bab0d61b29e6dcd035e3 (diff)
Do not override skip-cores if set in startup.conf
Change-Id: I97d75f58a46275fdad5add27dc59c731cc3ac64d Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/vlib/threads.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index 4e4f13eae86..c17fde4bfec 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -338,10 +338,8 @@ vlib_thread_init (vlib_main_t * vm)
avail_cpu = clib_bitmap_dup (tm->cpu_core_bitmap);
/* by default we skip core 0, unless it is the only one available */
- if (tm->skip_cores == ~0 && clib_bitmap_count_set_bits (avail_cpu) == 1)
- tm->skip_cores = 0;
- else
- tm->skip_cores = 1;
+ if (tm->skip_cores == ~0)
+ tm->skip_cores = (clib_bitmap_count_set_bits (avail_cpu) < 2) ? 0 : 1;
/* skip cores */
for (i = 0; i < tm->skip_cores; i++)