Current numa.h header for sparse re-defines functions in a way
that breaks the header from libnuma 2.0.13+, because the original
issue was fixed in that version:
25dcde021d
Sparse errors as a result:
lib/netdev-afxdp.c: note: in included file (through include/sparse/numa.h):
/usr/include/numa.h:346:26: error: macro "numa_get_interleave_mask_compat"
passed 1 arguments, but takes just 0
/usr/include/numa.h:376:26: error: macro "numa_get_membind_compat"
passed 1 arguments, but takes just 0
/usr/include/numa.h:406:26: error: macro "numa_get_run_node_mask_compat"
passed 1 arguments, but takes just 0
/usr/include/numa.h:347:1: error: Expected ; at end of declaration
/usr/include/numa.h:347:1: error: got {
/usr/include/numa.h:351:9: error: 'tp' has implicit type
It's hard to adjust defines to work with both versions of a header.
Just defining all the functions we actually use in OVS instead and
not including the original header.
Fixes: e8568993e062 ("netdev-afxdp: NUMA-aware memory allocation for XSK related memory.")
Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Currently, the AF_XDP socket (XSK) related memory are allocated by main
thread in the main thread's NUMA domain. With the patch that detects
netdev-linux's NUMA node id, the PMD thread of AF_XDP port will be run on
the AF_XDP netdev's NUMA domain. If the net device's NUMA domain
is different from the main thread's NUMA domain, we will have two
cross-NUMA memory accesses (netdev <-> memory, memory <-> CPU).
This patch addresses the aforementioned issue by allocating
the memory in the net device's NUMA domain.
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Acked-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>