diff options
author | Benoît Ganne <bganne@cisco.com> | 2020-09-15 10:45:55 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-11-12 12:33:22 +0000 |
commit | 07aeedd242da8d46ca74c1ad47d4876daa150c22 (patch) | |
tree | 63b2fc2d7a12b4aeb2db14e90a7946e13da80ce3 | |
parent | 020f02cf3df0538c4712aa94d68e2b42a0949d9b (diff) |
vpp: fix main heap init
NUMA node parsing with vlib_get_thread_core_numa() can failed on single
socket systems. Use clib_get_current_numa_node() instead as we already
pinned the main thread to the requested core.
Type: fix
Change-Id: I22339516d0305689a58584c92ded7c96eb53be39
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 33ce5e568f8b4fb1254bf5ee32865e9443c0185a)
-rw-r--r-- | src/vpp/vnet/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c index 00cb4ad385a..7d87d0cd3b1 100644 --- a/src/vpp/vnet/main.c +++ b/src/vpp/vnet/main.c @@ -282,11 +282,8 @@ defaulted: /* Allocate main heap */ if ((main_heap = clib_mem_init_thread_safe (0, main_heap_size))) { - vlib_worker_thread_t tmp; - /* Figure out which numa runs the main thread */ - vlib_get_thread_core_numa (&tmp, main_core); - __os_numa_index = tmp.numa_id; + __os_numa_index = clib_get_current_numa_node (); /* and use the main heap as that numa's numa heap */ clib_mem_set_per_numa_heap (main_heap); |