[PATCH net-next mlxsw] selftests: mlxsw: Don't rely on MZ's range notation

Petr Machata petrm at mellanox.com
Tue May 15 01:52:42 AEST 2018


When given a range, mausezahn should attempt to send a packet for each
address in the range. However, some of the packets are dropped, and in
some cases even just a single packet is sent. Just run MZ separately for
each packet, which works reliably.

Signed-off-by: Petr Machata <petrm at mellanox.com>
---

Notes:
    This should fix the regression that we have been observing on
    r-mgtswd-261.

 tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
index 963f4cb..a6d733d 100644
--- a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
@@ -94,9 +94,11 @@ __tc_flower_test()
 
 	tc_flower_rules_create $count $should_fail
 
-	$MZ $h1 -q -c 1 -t ip -p 20 -b bc -6 \
-		  -A 2001:db8:2::1 \
-		  -B $(tc_flower_addr 0)-$(tc_flower_addr $last)
+	for ((i = 0; i < count; ++i)); do
+		$MZ $h1 -q -c 1 -t ip -p 20 -b bc -6 \
+			-A 2001:db8:2::1 \
+			-B $(tc_flower_addr $i)
+	done
 
 	MISMATCHES=$(
 		tc -j -s filter show dev $h2 ingress |
-- 
2.4.11



More information about the Linux-mlxsw mailing list