diff mbox series

[net,2/2] selftests/net: fix missing xdp_dummy

Message ID 1665482267-30706-3-git-send-email-wangyufen@huawei.com (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series some fixes for selftest/net | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net, async
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: daniel@iogearbox.net; 9 maintainers not CCed: john.fastabend@gmail.com ast@kernel.org hawk@kernel.org linux-kselftest@vger.kernel.org matthias.bgg@gmail.com daniel@iogearbox.net shuah@kernel.org linux-mediatek@lists.infradead.org linux-arm-kernel@lists.infradead.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 87 exceeds 80 columns WARNING: line length of 93 exceeds 80 columns WARNING: line length of 97 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next-VM_Test-4 success Logs for llvm-toolchain
bpf/vmtest-bpf-next-VM_Test-5 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-2 success Logs for build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-3 success Logs for build for x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-1 success Logs for build for s390x with gcc
bpf/vmtest-bpf-next-VM_Test-15 success Logs for test_verifier on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-16 success Logs for test_verifier on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-17 success Logs for test_verifier on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-7 success Logs for test_maps on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-8 success Logs for test_maps on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-10 fail Logs for test_progs on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-12 success Logs for test_progs_no_alu32 on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-13 fail Logs for test_progs_no_alu32 on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-14 fail Logs for test_progs_no_alu32 on x86_64 with llvm-16
bpf/vmtest-bpf-next-PR fail PR summary
bpf/vmtest-bpf-next-VM_Test-6 success Logs for test_maps on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-9 success Logs for test_progs on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-11 fail Logs for test_progs on x86_64 with llvm-16

Commit Message

wangyufen Oct. 11, 2022, 9:57 a.m. UTC
After commit afef88e65554 ("selftests/bpf: Store BPF object files with
.bpf.o extension"), we should use xdp_dummy.bpf.o instade of xdp_dummy.o.

Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension")
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
---
 tools/testing/selftests/net/udpgro.sh         | 4 ++--
 tools/testing/selftests/net/udpgro_bench.sh   | 4 ++--
 tools/testing/selftests/net/udpgro_frglist.sh | 4 ++--
 tools/testing/selftests/net/udpgro_fwd.sh     | 2 +-
 tools/testing/selftests/net/veth.sh           | 8 ++++----
 5 files changed, 11 insertions(+), 11 deletions(-)

Comments

Daniel Müller Oct. 11, 2022, 4:27 p.m. UTC | #1
On Tue, Oct 11, 2022 at 05:57:47PM +0800, Wang Yufen wrote:
> After commit afef88e65554 ("selftests/bpf: Store BPF object files with
> .bpf.o extension"), we should use xdp_dummy.bpf.o instade of xdp_dummy.o.

*instead

> 
> Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension")
> Signed-off-by: Wang Yufen <wangyufen@huawei.com>
> ---
>  tools/testing/selftests/net/udpgro.sh         | 4 ++--
>  tools/testing/selftests/net/udpgro_bench.sh   | 4 ++--
>  tools/testing/selftests/net/udpgro_frglist.sh | 4 ++--
>  tools/testing/selftests/net/udpgro_fwd.sh     | 2 +-
>  tools/testing/selftests/net/veth.sh           | 8 ++++----
>  5 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/udpgro.sh b/tools/testing/selftests/net/udpgro.sh
> index ebbd0b2..e339e62 100755
> --- a/tools/testing/selftests/net/udpgro.sh
> +++ b/tools/testing/selftests/net/udpgro.sh
> @@ -34,7 +34,7 @@ cfg_veth() {
>  	ip -netns "${PEER_NS}" addr add dev veth1 192.168.1.1/24
>  	ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad
>  	ip -netns "${PEER_NS}" link set dev veth1 up
> -	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp
> +	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.bpf.o section xdp
>  }
>  
>  run_one() {
> @@ -195,7 +195,7 @@ run_all() {
>  	return $ret
>  }
>  
> -if [ ! -f ../bpf/xdp_dummy.o ]; then
> +if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
>  	echo "Missing xdp_dummy helper. Build bpf selftest first"
>  	exit -1
>  fi
> diff --git a/tools/testing/selftests/net/udpgro_bench.sh b/tools/testing/selftests/net/udpgro_bench.sh
> index fad2d1a..94372ea 100755
> --- a/tools/testing/selftests/net/udpgro_bench.sh
> +++ b/tools/testing/selftests/net/udpgro_bench.sh
> @@ -34,7 +34,7 @@ run_one() {
>  	ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad
>  	ip -netns "${PEER_NS}" link set dev veth1 up
>  
> -	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp
> +	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.bpf.o section xdp
>  	ip netns exec "${PEER_NS}" ./udpgso_bench_rx ${rx_args} -r &
>  	ip netns exec "${PEER_NS}" ./udpgso_bench_rx -t ${rx_args} -r &
>  
> @@ -80,7 +80,7 @@ run_all() {
>  	run_udp "${ipv6_args}"
>  }
>  
> -if [ ! -f ../bpf/xdp_dummy.o ]; then
> +if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
>  	echo "Missing xdp_dummy helper. Build bpf selftest first"
>  	exit -1
>  fi
> diff --git a/tools/testing/selftests/net/udpgro_frglist.sh b/tools/testing/selftests/net/udpgro_frglist.sh
> index be71583..6d51156 100755
> --- a/tools/testing/selftests/net/udpgro_frglist.sh
> +++ b/tools/testing/selftests/net/udpgro_frglist.sh
> @@ -36,7 +36,7 @@ run_one() {
>  	ip netns exec "${PEER_NS}" ethtool -K veth1 rx-gro-list on
>  
>  
> -	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp
> +	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.bpf.o section xdp
>  	tc -n "${PEER_NS}" qdisc add dev veth1 clsact
>  	tc -n "${PEER_NS}" filter add dev veth1 ingress prio 4 protocol ipv6 bpf object-file ../bpf/nat6to4.bpf.o section schedcls/ingress6/nat_6  direct-action
>  	tc -n "${PEER_NS}" filter add dev veth1 egress prio 4 protocol ip bpf object-file ../bpf/nat6to4.bpf.o section schedcls/egress4/snat4 direct-action
> @@ -81,7 +81,7 @@ run_all() {
>  	run_udp "${ipv6_args}"
>  }
>  
> -if [ ! -f ../bpf/xdp_dummy.o ]; then
> +if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
>  	echo "Missing xdp_dummy helper. Build bpf selftest first"
>  	exit -1
>  fi
> diff --git a/tools/testing/selftests/net/udpgro_fwd.sh b/tools/testing/selftests/net/udpgro_fwd.sh
> index 1bcd82e..0c32ee4 100755
> --- a/tools/testing/selftests/net/udpgro_fwd.sh
> +++ b/tools/testing/selftests/net/udpgro_fwd.sh
> @@ -46,7 +46,7 @@ create_ns() {
>  		ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24
>  		ip -n $BASE$ns addr add dev veth$ns $BM_NET_V6$ns/64 nodad
>  	done
> -	ip -n $NS_DST link set veth$DST xdp object ../bpf/xdp_dummy.o section xdp 2>/dev/null
> +	ip -n $NS_DST link set veth$DST xdp object ../bpf/xdp_dummy.bpf.o section xdp 2>/dev/null
>  }
>  
>  create_vxlan_endpoint() {
> diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
> index 430895d..704cba3 100755
> --- a/tools/testing/selftests/net/veth.sh
> +++ b/tools/testing/selftests/net/veth.sh
> @@ -216,7 +216,7 @@ while getopts "hs:" option; do
>  	esac
>  done
>  
> -if [ ! -f ../bpf/xdp_dummy.o ]; then
> +if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
>  	echo "Missing xdp_dummy helper. Build bpf selftest first"
>  	exit 1
>  fi
> @@ -288,14 +288,14 @@ if [ $CPUS -gt 1 ]; then
>  	ip netns exec $NS_DST ethtool -L veth$DST rx 1 tx 2 2>/dev/null
>  	ip netns exec $NS_SRC ethtool -L veth$SRC rx 1 tx 2 2>/dev/null
>  	printf "%-60s" "bad setting: XDP with RX nr less than TX"
> -	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o \
> +	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.bpf.o \
>  		section xdp 2>/dev/null &&\
>  		echo "fail - set operation successful ?!?" || echo " ok "
>  
>  	# the following tests will run with multiple channels active
>  	ip netns exec $NS_SRC ethtool -L veth$SRC rx 2
>  	ip netns exec $NS_DST ethtool -L veth$DST rx 2
> -	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o \
> +	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.bpf.o \
>  		section xdp 2>/dev/null
>  	printf "%-60s" "bad setting: reducing RX nr below peer TX with XDP set"
>  	ip netns exec $NS_DST ethtool -L veth$DST rx 1 2>/dev/null &&\
> @@ -311,7 +311,7 @@ if [ $CPUS -gt 2 ]; then
>  	chk_channels "setting invalid channels nr" $DST 2 2
>  fi
>  
> -ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o section xdp 2>/dev/null
> +ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.bpf.o section xdp 2>/dev/null
>  chk_gro_flag "with xdp attached - gro flag" $DST on
>  chk_gro_flag "        - peer gro flag" $SRC off
>  chk_tso_flag "        - tso flag" $SRC off
> -- 
> 1.8.3.1
> 

The change looks good to me. Sorry for the breakage. We should probably figure
out if it would make sense tun run these tests in BPF CI (assuming that would be
doable with reasonable effort).

Acked-by: Daniel Müller <deso@posteo.net>
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/udpgro.sh b/tools/testing/selftests/net/udpgro.sh
index ebbd0b2..e339e62 100755
--- a/tools/testing/selftests/net/udpgro.sh
+++ b/tools/testing/selftests/net/udpgro.sh
@@ -34,7 +34,7 @@  cfg_veth() {
 	ip -netns "${PEER_NS}" addr add dev veth1 192.168.1.1/24
 	ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad
 	ip -netns "${PEER_NS}" link set dev veth1 up
-	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp
+	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.bpf.o section xdp
 }
 
 run_one() {
@@ -195,7 +195,7 @@  run_all() {
 	return $ret
 }
 
-if [ ! -f ../bpf/xdp_dummy.o ]; then
+if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
 	echo "Missing xdp_dummy helper. Build bpf selftest first"
 	exit -1
 fi
diff --git a/tools/testing/selftests/net/udpgro_bench.sh b/tools/testing/selftests/net/udpgro_bench.sh
index fad2d1a..94372ea 100755
--- a/tools/testing/selftests/net/udpgro_bench.sh
+++ b/tools/testing/selftests/net/udpgro_bench.sh
@@ -34,7 +34,7 @@  run_one() {
 	ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad
 	ip -netns "${PEER_NS}" link set dev veth1 up
 
-	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp
+	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.bpf.o section xdp
 	ip netns exec "${PEER_NS}" ./udpgso_bench_rx ${rx_args} -r &
 	ip netns exec "${PEER_NS}" ./udpgso_bench_rx -t ${rx_args} -r &
 
@@ -80,7 +80,7 @@  run_all() {
 	run_udp "${ipv6_args}"
 }
 
-if [ ! -f ../bpf/xdp_dummy.o ]; then
+if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
 	echo "Missing xdp_dummy helper. Build bpf selftest first"
 	exit -1
 fi
diff --git a/tools/testing/selftests/net/udpgro_frglist.sh b/tools/testing/selftests/net/udpgro_frglist.sh
index be71583..6d51156 100755
--- a/tools/testing/selftests/net/udpgro_frglist.sh
+++ b/tools/testing/selftests/net/udpgro_frglist.sh
@@ -36,7 +36,7 @@  run_one() {
 	ip netns exec "${PEER_NS}" ethtool -K veth1 rx-gro-list on
 
 
-	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp
+	ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.bpf.o section xdp
 	tc -n "${PEER_NS}" qdisc add dev veth1 clsact
 	tc -n "${PEER_NS}" filter add dev veth1 ingress prio 4 protocol ipv6 bpf object-file ../bpf/nat6to4.bpf.o section schedcls/ingress6/nat_6  direct-action
 	tc -n "${PEER_NS}" filter add dev veth1 egress prio 4 protocol ip bpf object-file ../bpf/nat6to4.bpf.o section schedcls/egress4/snat4 direct-action
@@ -81,7 +81,7 @@  run_all() {
 	run_udp "${ipv6_args}"
 }
 
-if [ ! -f ../bpf/xdp_dummy.o ]; then
+if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
 	echo "Missing xdp_dummy helper. Build bpf selftest first"
 	exit -1
 fi
diff --git a/tools/testing/selftests/net/udpgro_fwd.sh b/tools/testing/selftests/net/udpgro_fwd.sh
index 1bcd82e..0c32ee4 100755
--- a/tools/testing/selftests/net/udpgro_fwd.sh
+++ b/tools/testing/selftests/net/udpgro_fwd.sh
@@ -46,7 +46,7 @@  create_ns() {
 		ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24
 		ip -n $BASE$ns addr add dev veth$ns $BM_NET_V6$ns/64 nodad
 	done
-	ip -n $NS_DST link set veth$DST xdp object ../bpf/xdp_dummy.o section xdp 2>/dev/null
+	ip -n $NS_DST link set veth$DST xdp object ../bpf/xdp_dummy.bpf.o section xdp 2>/dev/null
 }
 
 create_vxlan_endpoint() {
diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
index 430895d..704cba3 100755
--- a/tools/testing/selftests/net/veth.sh
+++ b/tools/testing/selftests/net/veth.sh
@@ -216,7 +216,7 @@  while getopts "hs:" option; do
 	esac
 done
 
-if [ ! -f ../bpf/xdp_dummy.o ]; then
+if [ ! -f ../bpf/xdp_dummy.bpf.o ]; then
 	echo "Missing xdp_dummy helper. Build bpf selftest first"
 	exit 1
 fi
@@ -288,14 +288,14 @@  if [ $CPUS -gt 1 ]; then
 	ip netns exec $NS_DST ethtool -L veth$DST rx 1 tx 2 2>/dev/null
 	ip netns exec $NS_SRC ethtool -L veth$SRC rx 1 tx 2 2>/dev/null
 	printf "%-60s" "bad setting: XDP with RX nr less than TX"
-	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o \
+	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.bpf.o \
 		section xdp 2>/dev/null &&\
 		echo "fail - set operation successful ?!?" || echo " ok "
 
 	# the following tests will run with multiple channels active
 	ip netns exec $NS_SRC ethtool -L veth$SRC rx 2
 	ip netns exec $NS_DST ethtool -L veth$DST rx 2
-	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o \
+	ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.bpf.o \
 		section xdp 2>/dev/null
 	printf "%-60s" "bad setting: reducing RX nr below peer TX with XDP set"
 	ip netns exec $NS_DST ethtool -L veth$DST rx 1 2>/dev/null &&\
@@ -311,7 +311,7 @@  if [ $CPUS -gt 2 ]; then
 	chk_channels "setting invalid channels nr" $DST 2 2
 fi
 
-ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o section xdp 2>/dev/null
+ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.bpf.o section xdp 2>/dev/null
 chk_gro_flag "with xdp attached - gro flag" $DST on
 chk_gro_flag "        - peer gro flag" $SRC off
 chk_tso_flag "        - tso flag" $SRC off