* [PATCH net-next] selftests: xsk: drop asm/barrier.h to fix the riscv build
@ 2026-11-16 10:51 Maciej Fijalkowski
2026-11-16 11:45 ` Jason Xing
2026-11-16 18:06 ` Maxime Chevallier
0 siblings, 2 replies; 3+ messages in thread
From: Maciej Fijalkowski @ 2026-11-16 10:51 UTC (permalink / raw)
To: netdev
Cc: magnus.karlsson, stfomichev, kuba, pabeni, tushar.vyavahare,
kerneljasonxing, bjorn, maxime.chevallier, Maciej Fijalkowski
xsk.c includes <asm/barrier.h>, a leftover from libbpf's AF_XDP code;
nothing in it uses a barrier, the ring helpers in xsk.h use C11
atomics. On riscv, the tools asm/barrier.h includes <asm/fence.h> from
tools/arch/riscv/include. selftests/bpf had that directory on the
include path but selftests/net does not, so since the move both
xskxceiver and xdp_hw_metadata fail to build on riscv:
asm/barrier.h:13:10: fatal error: asm/fence.h: No such file or directory
Drop the redundant include.
Fixes: e8f9d8237988 ("selftests: xsk: move the AF_XDP test suite to selftests/net")
Fixes: d01fb5c81130 ("selftests: net: move xdp_hw_metadata from selftests/bpf")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
tools/testing/selftests/net/lib/xsk/xsk.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/net/lib/xsk/xsk.c b/tools/testing/selftests/net/lib/xsk/xsk.c
index 6bd32caf5d08..4e9d14f883ac 100644
--- a/tools/testing/selftests/net/lib/xsk/xsk.c
+++ b/tools/testing/selftests/net/lib/xsk/xsk.c
@@ -13,7 +13,6 @@
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
-#include <asm/barrier.h>
#include <linux/compiler.h>
#include <linux/ethtool.h>
#include <linux/filter.h>
base-commit: 6964ff21c5d8b75649211a52dbfd92753e605649
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests: xsk: drop asm/barrier.h to fix the riscv build
2026-11-16 10:51 [PATCH net-next] selftests: xsk: drop asm/barrier.h to fix the riscv build Maciej Fijalkowski
@ 2026-11-16 11:45 ` Jason Xing
2026-11-16 18:06 ` Maxime Chevallier
1 sibling, 0 replies; 3+ messages in thread
From: Jason Xing @ 2026-11-16 11:45 UTC (permalink / raw)
To: Maciej Fijalkowski
Cc: netdev, magnus.karlsson, stfomichev, kuba, pabeni,
tushar.vyavahare, bjorn, maxime.chevallier
On Mon, Nov 16, 2026 at 6:52 PM Maciej Fijalkowski
<maciej.fijalkowski@intel.com> wrote:
>
> xsk.c includes <asm/barrier.h>, a leftover from libbpf's AF_XDP code;
> nothing in it uses a barrier, the ring helpers in xsk.h use C11
> atomics. On riscv, the tools asm/barrier.h includes <asm/fence.h> from
> tools/arch/riscv/include. selftests/bpf had that directory on the
> include path but selftests/net does not, so since the move both
> xskxceiver and xdp_hw_metadata fail to build on riscv:
>
> asm/barrier.h:13:10: fatal error: asm/fence.h: No such file or directory
>
> Drop the redundant include.
>
> Fixes: e8f9d8237988 ("selftests: xsk: move the AF_XDP test suite to selftests/net")
> Fixes: d01fb5c81130 ("selftests: net: move xdp_hw_metadata from selftests/bpf")
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests: xsk: drop asm/barrier.h to fix the riscv build
2026-11-16 10:51 [PATCH net-next] selftests: xsk: drop asm/barrier.h to fix the riscv build Maciej Fijalkowski
2026-11-16 11:45 ` Jason Xing
@ 2026-11-16 18:06 ` Maxime Chevallier
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Chevallier @ 2026-11-16 18:06 UTC (permalink / raw)
To: Maciej Fijalkowski, netdev
Cc: magnus.karlsson, stfomichev, kuba, pabeni, tushar.vyavahare,
kerneljasonxing, bjorn
Hi,
On 11/16/26 11:51, Maciej Fijalkowski wrote:
> xsk.c includes <asm/barrier.h>, a leftover from libbpf's AF_XDP code;
> nothing in it uses a barrier, the ring helpers in xsk.h use C11
> atomics. On riscv, the tools asm/barrier.h includes <asm/fence.h> from
> tools/arch/riscv/include. selftests/bpf had that directory on the
> include path but selftests/net does not, so since the move both
> xskxceiver and xdp_hw_metadata fail to build on riscv:
>
> asm/barrier.h:13:10: fatal error: asm/fence.h: No such file or directory
>
> Drop the redundant include.
>
> Fixes: e8f9d8237988 ("selftests: xsk: move the AF_XDP test suite to selftests/net")
> Fixes: d01fb5c81130 ("selftests: net: move xdp_hw_metadata from selftests/bpf")
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Works now, thanks :)
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
> ---
> tools/testing/selftests/net/lib/xsk/xsk.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/lib/xsk/xsk.c b/tools/testing/selftests/net/lib/xsk/xsk.c
> index 6bd32caf5d08..4e9d14f883ac 100644
> --- a/tools/testing/selftests/net/lib/xsk/xsk.c
> +++ b/tools/testing/selftests/net/lib/xsk/xsk.c
> @@ -13,7 +13,6 @@
> #include <string.h>
> #include <unistd.h>
> #include <arpa/inet.h>
> -#include <asm/barrier.h>
> #include <linux/compiler.h>
> #include <linux/ethtool.h>
> #include <linux/filter.h>
>
> base-commit: 6964ff21c5d8b75649211a52dbfd92753e605649
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-16 18:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 10:51 [PATCH net-next] selftests: xsk: drop asm/barrier.h to fix the riscv build Maciej Fijalkowski
2026-11-16 11:45 ` Jason Xing
2026-11-16 18:06 ` Maxime Chevallier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox