aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2020-08-23 11:06:23 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-24 17:36:11 -0700
commitf033ad8d85cc2ffafdba3f848295b9840d028278 (patch)
tree76cec3d59851de7289aa0cf94a25ab29443a97b5 /tools
parentmlxsw: spectrum_trap: Adjust default policer burst size for Spectrum-{2, 3} (diff)
downloadlinux-dev-f033ad8d85cc2ffafdba3f848295b9840d028278.tar.xz
linux-dev-f033ad8d85cc2ffafdba3f848295b9840d028278.zip
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 <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh b/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh
index 47edf099a17e..bd4ffed1cca3 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh
@@ -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)