diff options
Diffstat (limited to 'tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh')
-rw-r--r-- | tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh new file mode 100644 index 0000000000..303d7cbe3c --- /dev/null +++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0 +source ../rif_mac_profile_scale.sh + +rif_mac_profile_get_target() +{ + local should_fail=$1 + local target + + target=$(devlink_resource_size_get rif_mac_profiles) + + if ((! should_fail)); then + echo $target + else + echo $((target + 1)) + fi +} |