Commit 110d3ffe authored by Petr Machata's avatar Petr Machata Committed by Jakub Kicinski

selftests: router_mpath: Sleep after MZ

In the context of an offloaded datapath, it may take a while for the ip
link stats to be updated. This causes the test to fail when MZ_DELAY is too
low. Sleep after the packets are sent for the link stats to get up to date.
Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/8b1971d948273afd7de2da3d6a2ba35200540e55.1723036486.git.petrm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b72a6a7a
...@@ -243,6 +243,7 @@ multipath4_test() ...@@ -243,6 +243,7 @@ multipath4_test()
ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
-d $MZ_DELAY -t udp "sp=1024,dp=0-32768" -d $MZ_DELAY -t udp "sp=1024,dp=0-32768"
sleep 1
t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp12=$(link_stats_tx_packets_get $rp12)
t1_rp13=$(link_stats_tx_packets_get $rp13) t1_rp13=$(link_stats_tx_packets_get $rp13)
...@@ -276,6 +277,7 @@ multipath6_test() ...@@ -276,6 +277,7 @@ multipath6_test()
$MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \ $MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \
-d $MZ_DELAY -t udp "sp=1024,dp=0-32768" -d $MZ_DELAY -t udp "sp=1024,dp=0-32768"
sleep 1
t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp12=$(link_stats_tx_packets_get $rp12)
t1_rp13=$(link_stats_tx_packets_get $rp13) t1_rp13=$(link_stats_tx_packets_get $rp13)
......
...@@ -244,6 +244,7 @@ multipath4_test() ...@@ -244,6 +244,7 @@ multipath4_test()
ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
-d $MZ_DELAY -t udp "sp=1024,dp=0-32768" -d $MZ_DELAY -t udp "sp=1024,dp=0-32768"
sleep 1
t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp12=$(link_stats_tx_packets_get $rp12)
t1_rp13=$(link_stats_tx_packets_get $rp13) t1_rp13=$(link_stats_tx_packets_get $rp13)
...@@ -274,6 +275,7 @@ multipath6_l4_test() ...@@ -274,6 +275,7 @@ multipath6_l4_test()
$MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \ $MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \
-d $MZ_DELAY -t udp "sp=1024,dp=0-32768" -d $MZ_DELAY -t udp "sp=1024,dp=0-32768"
sleep 1
t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp12=$(link_stats_tx_packets_get $rp12)
t1_rp13=$(link_stats_tx_packets_get $rp13) t1_rp13=$(link_stats_tx_packets_get $rp13)
......
...@@ -180,6 +180,7 @@ multipath4_test() ...@@ -180,6 +180,7 @@ multipath4_test()
ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
-d $MZ_DELAY -t udp "sp=1024,dp=0-32768" -d $MZ_DELAY -t udp "sp=1024,dp=0-32768"
sleep 1
t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp12=$(link_stats_tx_packets_get $rp12)
t1_rp13=$(link_stats_tx_packets_get $rp13) t1_rp13=$(link_stats_tx_packets_get $rp13)
...@@ -217,6 +218,7 @@ multipath6_test() ...@@ -217,6 +218,7 @@ multipath6_test()
$MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \ $MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \
-d $MZ_DELAY -t udp "sp=1024,dp=0-32768" -d $MZ_DELAY -t udp "sp=1024,dp=0-32768"
sleep 1
t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp12=$(link_stats_tx_packets_get $rp12)
t1_rp13=$(link_stats_tx_packets_get $rp13) t1_rp13=$(link_stats_tx_packets_get $rp13)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment