mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
selftests: net: explicitly wait for listener ready
The UDP GRO forwarding test still hard-code an arbitrary pause
to wait for the UDP listener becoming ready in background.
That causes sporadic failures depending on the host load.
Replace the sleep with the existing helper waiting for the desired
port being exposed.
Fixes: a062260a9d ("selftests: net: add UDP GRO forwarding self-tests")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/4d58900fb09cef42749cfcf2ad7f4b91a97d225c.1706131762.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
f5173fe3e1
commit
4acffb6663
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
source net_helper.sh
|
||||||
|
|
||||||
BPF_FILE="xdp_dummy.o"
|
BPF_FILE="xdp_dummy.o"
|
||||||
readonly BASE="ns-$(mktemp -u XXXXXX)"
|
readonly BASE="ns-$(mktemp -u XXXXXX)"
|
||||||
readonly SRC=2
|
readonly SRC=2
|
||||||
@@ -119,7 +121,7 @@ run_test() {
|
|||||||
ip netns exec $NS_DST $ipt -A INPUT -p udp --dport 8000
|
ip netns exec $NS_DST $ipt -A INPUT -p udp --dport 8000
|
||||||
ip netns exec $NS_DST ./udpgso_bench_rx -C 1000 -R 10 -n 10 -l 1300 $rx_args &
|
ip netns exec $NS_DST ./udpgso_bench_rx -C 1000 -R 10 -n 10 -l 1300 $rx_args &
|
||||||
local spid=$!
|
local spid=$!
|
||||||
sleep 0.1
|
wait_local_port_listen "$NS_DST" 8000 udp
|
||||||
ip netns exec $NS_SRC ./udpgso_bench_tx $family -M 1 -s 13000 -S 1300 -D $dst
|
ip netns exec $NS_SRC ./udpgso_bench_tx $family -M 1 -s 13000 -S 1300 -D $dst
|
||||||
local retc=$?
|
local retc=$?
|
||||||
wait $spid
|
wait $spid
|
||||||
@@ -168,7 +170,7 @@ run_bench() {
|
|||||||
ip netns exec $NS_DST bash -c "echo 2 > /sys/class/net/veth$DST/queues/rx-0/rps_cpus"
|
ip netns exec $NS_DST bash -c "echo 2 > /sys/class/net/veth$DST/queues/rx-0/rps_cpus"
|
||||||
ip netns exec $NS_DST taskset 0x2 ./udpgso_bench_rx -C 1000 -R 10 &
|
ip netns exec $NS_DST taskset 0x2 ./udpgso_bench_rx -C 1000 -R 10 &
|
||||||
local spid=$!
|
local spid=$!
|
||||||
sleep 0.1
|
wait_local_port_listen "$NS_DST" 8000 udp
|
||||||
ip netns exec $NS_SRC taskset 0x1 ./udpgso_bench_tx $family -l 3 -S 1300 -D $dst
|
ip netns exec $NS_SRC taskset 0x1 ./udpgso_bench_tx $family -l 3 -S 1300 -D $dst
|
||||||
local retc=$?
|
local retc=$?
|
||||||
wait $spid
|
wait $spid
|
||||||
|
|||||||
Reference in New Issue
Block a user