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:
@@ -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;
