[v3,1/6] net/af_xdp: move XDP library presence flag to right branch
Checks
Commit Message
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
xsk_socket__create_shared().
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(-)
@@ -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')