diff options
author | Danielle Ratson <[email protected]> | 2019-10-17 09:55:16 +0300 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-10-18 10:05:37 -0700 |
commit | cb7d2c719c288dee9ef0e97c66f404600795c7f9 (patch) | |
tree | a4bec4ae127982d4dbdbdf719a0cd8a2a18f5ffa | |
parent | 49c65e4ff19772847e030e04121bece0517eb32c (diff) |
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 <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh | 16 |
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 +} |