diff mbox series

[v3,1/6] net/af_xdp: move XDP library presence flag to right branch

Message ID 20221005095037.997006-3-andrew.rybchenko@oktetlabs.ru (mailing list archive)
State Superseded, archived
Delegated to: Andrew Rybchenko
Headers show
Series net/af_xdp: make compatible with libbpf v0.8.0 | expand


Context Check Description
ci/iol-testing warning apply patch failure
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Oct. 5, 2022, 9:50 a.m. UTC
RTE_NET_AF_XDP_LIBXDP is a conditional to include xdp/xsk.h and should
be set as soon as we know that the header is present.
RTE_NET_AF_XDP_SHARED_UMEM is one of conditions to use
Both do not depend on libbpf and bpf/bpf.h presence.

Since else branch below returns error, there is no functional changes,
just style which will help on further rework.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
 drivers/net/af_xdp/meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series


diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index 1e0de23705..882d0b9518 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -17,10 +17,10 @@  endif
 if cc.has_header('linux/if_xdp.h')
     if xdp_dep.found() and cc.has_header('xdp/xsk.h')
+        cflags += ['-DRTE_NET_AF_XDP_LIBXDP']
+        cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM']
+        ext_deps += xdp_dep
         if bpf_dep.found() and cc.has_header('bpf/bpf.h')
-            cflags += ['-DRTE_NET_AF_XDP_LIBXDP']
-            cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM']
-            ext_deps += xdp_dep
             ext_deps += bpf_dep
             bpf_ver_dep = dependency('libbpf', version : '>=0.7.0',
                                  required: false, method: 'pkg-config')