Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/net: fix section name when using xdp_dummy.o

Since commit 8fffa0e3451a ("selftests/bpf: Normalize XDP section names in
selftests") the xdp_dummy.o's section name has changed to xdp. But some
tests are still using "section xdp_dummy", which make the tests failed.
Fix them by updating to the new section name.

Fixes: 8fffa0e3451a ("selftests/bpf: Normalize XDP section names in selftests")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220630062228.3453016-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hangbin Liu and committed by
Jakub Kicinski
d28b25a6 bc38fae3

+7 -7
+1 -1
tools/testing/selftests/net/udpgro.sh
··· 34 34 ip -netns "${PEER_NS}" addr add dev veth1 192.168.1.1/24 35 35 ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad 36 36 ip -netns "${PEER_NS}" link set dev veth1 up 37 - ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp_dummy 37 + ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp 38 38 } 39 39 40 40 run_one() {
+1 -1
tools/testing/selftests/net/udpgro_bench.sh
··· 34 34 ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad 35 35 ip -netns "${PEER_NS}" link set dev veth1 up 36 36 37 - ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp_dummy 37 + ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp 38 38 ip netns exec "${PEER_NS}" ./udpgso_bench_rx ${rx_args} -r & 39 39 ip netns exec "${PEER_NS}" ./udpgso_bench_rx -t ${rx_args} -r & 40 40
+1 -1
tools/testing/selftests/net/udpgro_frglist.sh
··· 36 36 ip netns exec "${PEER_NS}" ethtool -K veth1 rx-gro-list on 37 37 38 38 39 - ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp_dummy 39 + ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp 40 40 tc -n "${PEER_NS}" qdisc add dev veth1 clsact 41 41 tc -n "${PEER_NS}" filter add dev veth1 ingress prio 4 protocol ipv6 bpf object-file ../bpf/nat6to4.o section schedcls/ingress6/nat_6 direct-action 42 42 tc -n "${PEER_NS}" filter add dev veth1 egress prio 4 protocol ip bpf object-file ../bpf/nat6to4.o section schedcls/egress4/snat4 direct-action
+1 -1
tools/testing/selftests/net/udpgro_fwd.sh
··· 46 46 ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24 47 47 ip -n $BASE$ns addr add dev veth$ns $BM_NET_V6$ns/64 nodad 48 48 done 49 - ip -n $NS_DST link set veth$DST xdp object ../bpf/xdp_dummy.o section xdp_dummy 2>/dev/null 49 + ip -n $NS_DST link set veth$DST xdp object ../bpf/xdp_dummy.o section xdp 2>/dev/null 50 50 } 51 51 52 52 create_vxlan_endpoint() {
+3 -3
tools/testing/selftests/net/veth.sh
··· 289 289 ip netns exec $NS_SRC ethtool -L veth$SRC rx 1 tx 2 2>/dev/null 290 290 printf "%-60s" "bad setting: XDP with RX nr less than TX" 291 291 ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o \ 292 - section xdp_dummy 2>/dev/null &&\ 292 + section xdp 2>/dev/null &&\ 293 293 echo "fail - set operation successful ?!?" || echo " ok " 294 294 295 295 # the following tests will run with multiple channels active 296 296 ip netns exec $NS_SRC ethtool -L veth$SRC rx 2 297 297 ip netns exec $NS_DST ethtool -L veth$DST rx 2 298 298 ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o \ 299 - section xdp_dummy 2>/dev/null 299 + section xdp 2>/dev/null 300 300 printf "%-60s" "bad setting: reducing RX nr below peer TX with XDP set" 301 301 ip netns exec $NS_DST ethtool -L veth$DST rx 1 2>/dev/null &&\ 302 302 echo "fail - set operation successful ?!?" || echo " ok " ··· 311 311 chk_channels "setting invalid channels nr" $DST 2 2 312 312 fi 313 313 314 - ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o section xdp_dummy 2>/dev/null 314 + ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.o section xdp 2>/dev/null 315 315 chk_gro_flag "with xdp attached - gro flag" $DST on 316 316 chk_gro_flag " - peer gro flag" $SRC off 317 317 chk_tso_flag " - tso flag" $SRC off