45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
From 50b855fc47f07e98895703fcb324266d1454be3e Mon Sep 17 00:00:00 2001
|
|
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
|
|
Date: Thu, 6 Oct 2022 09:26:49 +0300
|
|
Subject: [PATCH] net/af_xdp: move XDP library presence flag setting
|
|
|
|
[ upstream commit 50b855fc47f07e98895703fcb324266d1454be3e ]
|
|
|
|
|
|
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>
|
|
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
|
|
---
|
|
drivers/net/af_xdp/meson.build | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
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')
|
|
--
|
|
2.33.0
|
|
|