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

2018-09-21 Thread Burakov, Anatoly
On 21-Sep-18 7:47 AM, Ilya Maximets wrote: On 20.09.2018 15:50, 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 check if NUMA is available in the f

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

2018-09-20 Thread Ilya Maximets
On 20.09.2018 15:50, 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 check if > NUMA is available in the first place, which, according to > the

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

2018-09-20 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