[v2] net/af_xdp: fix cflags to appropriate UMEM feature

Message ID 20230922093103.58541-1-shibin.koikkara.reeny@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] net/af_xdp: fix cflags to appropriate UMEM feature |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing fail Unit Testing FAIL
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Koikkara Reeny, Shibin Sept. 22, 2023, 9:31 a.m. UTC
  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(-)
  

Patch

diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index 9a8dbb4d49..3319acca65 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -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