summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorJon Loeliger <jdl@netgate.com>2020-01-30 18:37:47 -0600
committerDamjan Marion <dmarion@me.com>2020-02-10 18:53:46 +0000
commitf617b145ebc2f6ea2ad9bc3b6fa26968a0493821 (patch)
tree2b768a0afeaa7c26547c8b8e25ff29e41ff77654 /src/vlib
parente053056bb33f6b5c3363cbe9bb27e01e84c2e6df (diff)
vlib: properly configure main thread's core id
Prior to this patch, the main thread's core id was always reported as 0. This patch makes a call to vlib_get_thread_core_socket() on the main thread so that its core id is set properly. Type: fix Fixes: 5d64c7868f67749a6c99eb4ee5998b518ab6c71c Change-Id: I019cb95eec031da25197e48d956038c4bd6b5040 Signed-off-by: Jon Loeliger <jdl@netgate.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index a827e3594e8..8a068875617 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -283,6 +283,8 @@ vlib_thread_init (vlib_main_t * vm)
w->thread_id = pthread_self ();
tm->n_vlib_mains = 1;
+ vlib_get_thread_core_numa (w, w->cpu_id);
+
if (tm->sched_policy != ~0)
{
struct sched_param sched_param;