selftests: mptcp: add ms units for tc-netem delay

'delay 1' in tc-netem is confusing, not sure if it's a delay of 1 second or
1 millisecond. This patch explicitly adds millisecond units to make these
commands clearer.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Geliang Tang 2024-04-05 12:52:06 +02:00 committed by David S. Miller
parent f30b04cacd
commit 9109853a38
2 changed files with 5 additions and 5 deletions

View File

@ -125,8 +125,8 @@ init_shapers()
{ {
local i local i
for i in $(seq 1 4); do for i in $(seq 1 4); do
tc -n $ns1 qdisc add dev ns1eth$i root netem rate 20mbit delay 1 tc -n $ns1 qdisc add dev ns1eth$i root netem rate 20mbit delay 1ms
tc -n $ns2 qdisc add dev ns2eth$i root netem rate 20mbit delay 1 tc -n $ns2 qdisc add dev ns2eth$i root netem rate 20mbit delay 1ms
done done
} }
@ -3212,7 +3212,7 @@ fail_tests()
# multiple subflows # multiple subflows
if reset_with_fail "MP_FAIL MP_RST" 2; then if reset_with_fail "MP_FAIL MP_RST" 2; then
tc -n $ns2 qdisc add dev ns2eth1 root netem rate 1mbit delay 5 tc -n $ns2 qdisc add dev ns2eth1 root netem rate 1mbit delay 5ms
pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns1 0 1
pm_nl_set_limits $ns2 0 1 pm_nl_set_limits $ns2 0 1
pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow

View File

@ -216,8 +216,8 @@ run_test()
shift 4 shift 4
local msg=$* local msg=$*
[ $delay1 -gt 0 ] && delay1="delay $delay1" || delay1="" [ $delay1 -gt 0 ] && delay1="delay ${delay1}ms" || delay1=""
[ $delay2 -gt 0 ] && delay2="delay $delay2" || delay2="" [ $delay2 -gt 0 ] && delay2="delay ${delay2}ms" || delay2=""
for dev in ns1eth1 ns1eth2; do for dev in ns1eth1 ns1eth2; do
tc -n $ns1 qdisc del dev $dev root >/dev/null 2>&1 tc -n $ns1 qdisc del dev $dev root >/dev/null 2>&1