aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh
diff options
context:
space:
mode:
authorDanielle Ratson <danieller@mellanox.com>2019-10-17 09:55:16 +0300
committerDavid S. Miller <davem@davemloft.net>2019-10-18 10:05:37 -0700
commitcb7d2c719c288dee9ef0e97c66f404600795c7f9 (patch)
treea4bec4ae127982d4dbdbdf719a0cd8a2a18f5ffa /tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh
parentselftests: mlxsw: Generalize the parameters of mirror_gre test (diff)
downloadlinux-dev-cb7d2c719c288dee9ef0e97c66f404600795c7f9.tar.xz
linux-dev-cb7d2c719c288dee9ef0e97c66f404600795c7f9.zip
selftests: mlxsw: Add Spectrum-2 mirror-to-gretap target scale test
Like in Spectrum, use the number of analyzers taken from the devlink command. Signed-off-by: Danielle Ratson <danieller@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh
new file mode 100644
index 000000000000..f7c168decd1e
--- /dev/null
+++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0
+source ../mirror_gre_scale.sh
+
+mirror_gre_get_target()
+{
+ local should_fail=$1; shift
+ local target
+
+ target=$(devlink_resource_size_get span_agents)
+
+ if ((! should_fail)); then
+ echo $target
+ else
+ echo $((target + 1))
+ fi
+}