Skip to content

Commit d28b25a

Browse files
liuhangbinkuba-moo
authored andcommitted
selftests/net: fix section name when using xdp_dummy.o
Since commit 8fffa0e ("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: 8fffa0e ("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>
1 parent bc38fae commit d28b25a

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

tools/testing/selftests/net/udpgro.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cfg_veth() {
3434
ip -netns "${PEER_NS}" addr add dev veth1 192.168.1.1/24
3535
ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad
3636
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
3838
}
3939

4040
run_one() {

tools/testing/selftests/net/udpgro_bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ run_one() {
3434
ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad
3535
ip -netns "${PEER_NS}" link set dev veth1 up
3636

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
3838
ip netns exec "${PEER_NS}" ./udpgso_bench_rx ${rx_args} -r &
3939
ip netns exec "${PEER_NS}" ./udpgso_bench_rx -t ${rx_args} -r &
4040

tools/testing/selftests/net/udpgro_frglist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ run_one() {
3636
ip netns exec "${PEER_NS}" ethtool -K veth1 rx-gro-list on
3737

3838

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
4040
tc -n "${PEER_NS}" qdisc add dev veth1 clsact
4141
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
4242
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

tools/testing/selftests/net/udpgro_fwd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ create_ns() {
4646
ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24
4747
ip -n $BASE$ns addr add dev veth$ns $BM_NET_V6$ns/64 nodad
4848
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
5050
}
5151

5252
create_vxlan_endpoint() {

tools/testing/selftests/net/veth.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,14 @@ if [ $CPUS -gt 1 ]; then
289289
ip netns exec $NS_SRC ethtool -L veth$SRC rx 1 tx 2 2>/dev/null
290290
printf "%-60s" "bad setting: XDP with RX nr less than TX"
291291
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 &&\
293293
echo "fail - set operation successful ?!?" || echo " ok "
294294

295295
# the following tests will run with multiple channels active
296296
ip netns exec $NS_SRC ethtool -L veth$SRC rx 2
297297
ip netns exec $NS_DST ethtool -L veth$DST rx 2
298298
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
300300
printf "%-60s" "bad setting: reducing RX nr below peer TX with XDP set"
301301
ip netns exec $NS_DST ethtool -L veth$DST rx 1 2>/dev/null &&\
302302
echo "fail - set operation successful ?!?" || echo " ok "
@@ -311,7 +311,7 @@ if [ $CPUS -gt 2 ]; then
311311
chk_channels "setting invalid channels nr" $DST 2 2
312312
fi
313313

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
315315
chk_gro_flag "with xdp attached - gro flag" $DST on
316316
chk_gro_flag " - peer gro flag" $SRC off
317317
chk_tso_flag " - tso flag" $SRC off

0 commit comments

Comments
 (0)