Commit f033ad8d authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller
Browse files

selftests: mlxsw: Decrease required rate accuracy



On Spectrum-{2,3} the required accuracy is +/-10%.

Align the test to this requirement so that it can reliably pass on these
platforms.

Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7ee0db9d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -220,8 +220,8 @@ __rate_test()

	rate=$(trap_rate_get)
	pct=$((100 * (rate - 1000) / 1000))
	((-5 <= pct && pct <= 5))
	check_err $? "Expected rate 1000 pps, got $rate pps, which is $pct% off. Required accuracy is +-5%"
	((-10 <= pct && pct <= 10))
	check_err $? "Expected rate 1000 pps, got $rate pps, which is $pct% off. Required accuracy is +-10%"
	log_info "Expected rate 1000 pps, measured rate $rate pps"

	drop_rate=$(policer_drop_rate_get $id)