aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2022-06-16 13:42:44 +0300
committerDavid S. Miller <davem@davemloft.net>2022-06-17 10:31:33 +0100
commitbe00853bfd2e704893916bc349e7ab1d50615cb4 (patch)
tree3b0796c444bbb80b06a1e1610511e4aa4623dcf6 /tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
parentselftests: mlxsw: tc_flower_scale: Add a traffic test (diff)
downloadlinux-dev-be00853bfd2e704893916bc349e7ab1d50615cb4.tar.xz
linux-dev-be00853bfd2e704893916bc349e7ab1d50615cb4.zip
selftests: mlxsw: Add a RIF counter scale test
This tests creates as many RIFs as possible, ideally more than there can be RIF counters (though that is currently only possible on Spectrum-1). It then tries to enable L3 HW stats on each of the RIFs. It also contains the traffic test, which tries to run traffic through a log2 of those counters and checks that the traffic is shown in the counter values. Like with tc_flower traffic test, take a log2 subset of rules. The logic behind picking log2 rules is that then every bit of the instantiated item's number is exercised. This should catch issues whether they happen at the high end, low end, or somewhere in between. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh')
-rwxr-xr-xtools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
index 1a7a472edfd0..688338bbeb97 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
@@ -25,7 +25,16 @@ cleanup()
trap cleanup EXIT
-ALL_TESTS="router tc_flower mirror_gre tc_police port rif_mac_profile"
+ALL_TESTS="
+ router
+ tc_flower
+ mirror_gre
+ tc_police
+ port
+ rif_mac_profile
+ rif_counter
+"
+
for current_test in ${TESTS:-$ALL_TESTS}; do
RET_FIN=0
source ${current_test}_scale.sh