[v2] net/af_xdp: fix cflags to appropriate UMEM feature
Checks
Commit Message
Fix missing RTE_NET_AF_XDP_SHARED_UMEM flag in
xsk_socket__create_shared().
rte_pmd_af_xdp_probe(): Initializing pmd_af_xdp for net_af_xdp0
init_internals(): Shared UMEM feature not available. Check kernel and
libbpf version
rte_pmd_af_xdp_probe(): Failed to init internals
vdev_probe(): failed to initialize net_af_xdp0 device
EAL: Bus (vdev) probe failed.
Fixes: e024c7e838fc ("net/af_xdp: avoid version-based check for shared UMEM")
Fixes: 33d66940e9ba ("build: use C11 standard")
Fix is for the commit e024c7e838fc ("net/af_xdp: avoid
version-based check for shared UMEM") fixline would imply
a possible backport though, but no issue has been seen on
version of DPDK not using C11, so I will be skipping
backporting this for now.
Commit 33d66940e9ba ("build: use C11 standard") enforces
the C11 standard so some changes need to be made to the
af_xdp driver meson build to ensure that the appropriate
cflags are passed when checking if certain functions are
available in the libbpf/libxdp libraries.
Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
---
drivers/net/af_xdp/meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -56,17 +56,17 @@ if build
'''
if cc.has_function('xsk_socket__create_shared', prefix : xsk_check_prefix,
- dependencies : ext_deps)
+ dependencies : ext_deps, args: cflags)
cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM']
endif
if cc.has_function('bpf_object__next_program',
prefix : '#include <bpf/libbpf.h>',
- dependencies : bpf_dep)
+ dependencies : bpf_dep, args: cflags)
cflags += ['-DRTE_NET_AF_XDP_LIBBPF_OBJ_OPEN']
endif
if cc.has_function('bpf_xdp_attach',
prefix : '#include <bpf/libbpf.h>',
- dependencies : bpf_dep)
+ dependencies : bpf_dep, args: cflags)
cflags += ['-DRTE_NET_AF_XDP_LIBBPF_XDP_ATTACH']
endif
endif