selftests: spectrum-2: tc_flower_scale: Dynamically set scale target
authorIdo Schimmel <idosch@nvidia.com>
Thu, 16 Jun 2022 10:42:45 +0000 (13:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jun 2022 09:31:33 +0000 (10:31 +0100)
commited62af45467a6786cbdeef42a7b4e7ced374f593
treedd87036e2d2425e1dd78d367ca68953f8598945e
parentbe00853bfd2e704893916bc349e7ab1d50615cb4
selftests: spectrum-2: tc_flower_scale: Dynamically set scale target

Instead of hard coding the scale target in the test, dynamically set it
based on the maximum number of flow counters and their current
occupancy.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower_scale.sh