Skip to content

Commit

Permalink
selftests: net: use the dummy bpf from net/lib
Browse files Browse the repository at this point in the history
Commit 29b036b ("selftests: drv-net: test XDP, HDS auto and
the ioctl path") added an sample XDP_PASS prog in net/lib, so
that we can reuse it in various sub-directories. Delete the old
sample and use the one from the lib in existing tests.

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250327222315.1098596-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Mar 31, 2025
1 parent e514d77 commit c231e12
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 31 deletions.
2 changes: 1 addition & 1 deletion tools/testing/selftests/drivers/net/hw/irq.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def reconfig(cfg) -> None:
def check_reconfig_xdp(cfg) -> None:
def reconfig(cfg) -> None:
ip(f"link set dev %s xdp obj %s sec xdp" %
(cfg.ifname, cfg.test_dir / "xdp_dummy.bpf.o"))
(cfg.ifname, cfg.net_lib_dir / "xdp_dummy.bpf.o"))
ip(f"link set dev %s xdp off" % cfg.ifname)

_check_reconfig(cfg, reconfig)
Expand Down
13 changes: 0 additions & 13 deletions tools/testing/selftests/drivers/net/hw/xdp_dummy.bpf.c

This file was deleted.

2 changes: 1 addition & 1 deletion tools/testing/selftests/net/udpgro_bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source net_helper.sh

readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)"

BPF_FILE="xdp_dummy.bpf.o"
BPF_FILE="lib/xdp_dummy.bpf.o"

cleanup() {
local -r jobs="$(jobs -p)"
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/udpgro_frglist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source net_helper.sh

readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)"

BPF_FILE="xdp_dummy.bpf.o"
BPF_FILE="lib/xdp_dummy.bpf.o"

cleanup() {
local -r jobs="$(jobs -p)"
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/udpgro_fwd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

source net_helper.sh

BPF_FILE="xdp_dummy.bpf.o"
BPF_FILE="lib/xdp_dummy.bpf.o"
readonly BASE="ns-$(mktemp -u XXXXXX)"
readonly SRC=2
readonly DST=1
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/veth.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

BPF_FILE="xdp_dummy.bpf.o"
BPF_FILE="lib/xdp_dummy.bpf.o"
readonly STATS="$(mktemp -p /tmp ns-XXXXXX)"
readonly BASE=`basename $STATS`
readonly SRC=2
Expand Down
13 changes: 0 additions & 13 deletions tools/testing/selftests/net/xdp_dummy.bpf.c

This file was deleted.

0 comments on commit c231e12

Please sign in to comment.