Skip to content

Commit f033ad8

Browse files
idoschdavem330
authored andcommitted
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: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7ee0db9 commit f033ad8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ __rate_test()
220220

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

227227
drop_rate=$(policer_drop_rate_get $id)

0 commit comments

Comments
 (0)