aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/main.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-27 17:54:11 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-01-27 20:23:17 +0000
commitee721412ebd3434bc6dd60f5a78f53a4f6e97667 (patch)
treebe5d65a55fe68d7de55740fed6dfbfaaf3b7e6a7 /src/vlib/main.c
parent87c657036a804c1dd20bfc83c665c105fcdda26c (diff)
Fix issue with cpu_id and numa_code captured too early
Change-Id: I79b213b34c6071d14acf1922f89037a4a5a36c45 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r--src/vlib/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index 3048a0d72de..cfd23859210 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -1696,6 +1696,12 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
{
vlib_node_runtime_t *n;
+ if (PREDICT_FALSE (vm->cpu_id != clib_get_current_cpu_id ()))
+ {
+ vm->cpu_id = clib_get_current_cpu_id ();
+ vm->numa_node = clib_get_current_numa_node ();
+ }
+
if (PREDICT_FALSE (_vec_len (vm->pending_rpc_requests) > 0))
{
if (!is_main)