From 5f351e46e5b63b2b3a985face8ae9d9894e9d3b2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 11 Jul 2022 10:42:14 +0200 Subject: [PATCH] 5.15-stable patches added patches: selftests-net-fix-section-name-when-using-xdp_dummy.o.patch --- ...-section-name-when-using-xdp_dummy.o.patch | 88 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 89 insertions(+) create mode 100644 queue-5.15/selftests-net-fix-section-name-when-using-xdp_dummy.o.patch diff --git a/queue-5.15/selftests-net-fix-section-name-when-using-xdp_dummy.o.patch b/queue-5.15/selftests-net-fix-section-name-when-using-xdp_dummy.o.patch new file mode 100644 index 00000000000..5135fcb4792 --- /dev/null +++ b/queue-5.15/selftests-net-fix-section-name-when-using-xdp_dummy.o.patch @@ -0,0 +1,88 @@ +From d28b25a62a47a8c8aa19bd543863aab6717e68c9 Mon Sep 17 00:00:00 2001 +From: Hangbin Liu +Date: Thu, 30 Jun 2022 14:22:28 +0800 +Subject: selftests/net: fix section name when using xdp_dummy.o + +From: Hangbin Liu + +commit d28b25a62a47a8c8aa19bd543863aab6717e68c9 upstream. + +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 +Acked-by: Andrii Nakryiko +Link: https://lore.kernel.org/r/20220630062228.3453016-1-liuhangbin@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/net/udpgro.sh | 2 +- + tools/testing/selftests/net/udpgro_bench.sh | 2 +- + tools/testing/selftests/net/udpgro_fwd.sh | 2 +- + tools/testing/selftests/net/veth.sh | 6 +++--- + 4 files changed, 6 insertions(+), 6 deletions(-) + +--- 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_dummy ++ ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp + } + + run_one() { +--- 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_dummy ++ ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.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 & + +--- 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_dummy 2>/dev/null ++ ip -n $NS_DST link set veth$DST xdp object ../bpf/xdp_dummy.o section xdp 2>/dev/null + } + + create_vxlan_endpoint() { +--- a/tools/testing/selftests/net/veth.sh ++++ b/tools/testing/selftests/net/veth.sh +@@ -289,14 +289,14 @@ if [ $CPUS -gt 1 ]; then + 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 \ +- section xdp_dummy 2>/dev/null &&\ ++ 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 \ +- section xdp_dummy 2>/dev/null ++ 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 &&\ + echo "fail - set operation successful ?!?" || echo " ok " +@@ -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_dummy 2>/dev/null ++ip -n $NS_DST link set dev veth$DST xdp object ../bpf/xdp_dummy.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 diff --git a/queue-5.15/series b/queue-5.15/series index a5b20ab54c9..f3b70554921 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -227,3 +227,4 @@ dmaengine-ti-fix-refcount-leak-in-ti_dra7_xbar_route_allocate.patch dmaengine-qcom-bam_dma-fix-runtime-pm-underflow.patch dmaengine-ti-add-missing-put_device-in-ti_dra7_xbar_route_allocate.patch dmaengine-idxd-force-wq-context-cleanup-on-device-disable-path.patch +selftests-net-fix-section-name-when-using-xdp_dummy.o.patch -- 2.47.3