Re: [dpdk-dev] [PATCH] mem: fix undefined behavior in NUMA code

2018-08-29 Thread Ilya Maximets
Hi. Thanks for the fix. Comments inline. Best regards, Ilya Maximets. On 29.08.2018 15:21, Anatoly Burakov wrote: > When NUMA-aware hugepages config option is set, we rely on > libnuma to tell the kernel to allocate hugepages on a specific > NUMA node. However, we allocate node mask before we che

[dpdk-dev] [PATCH] mem: fix undefined behavior in NUMA code

2018-08-29 Thread Anatoly Burakov
When NUMA-aware hugepages config option is set, we rely on libnuma to tell the kernel to allocate hugepages on a specific NUMA node. However, we allocate node mask before we check if NUMA is available in the first place, which, according to the manpage [1], causes undefined behaviour. Fix by only