Re: [PATCH net-next] selftests: xsk: drop asm/barrier.h to fix the riscv build

From
Maxime Chevallier <maxime.chevallier@bootlin.com>
Date
2026-11-16 18:06:48
Reply to
Maciej Fijalkowski, 2026-11-16
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
quoted hunk ↗ jump to hunk
---
 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
  
Thread (3 messages) 3 messages, 3 authors, last reply 3h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help