]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: mlxsw: resource_scale: Pass target count to cleanup
authorPetr Machata <petrm@nvidia.com>
Thu, 16 Jun 2022 10:42:42 +0000 (13:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jun 2022 09:31:33 +0000 (10:31 +0100)
commit7d1a8c21ddcf510c5407fc9d029a217362171432
tree26d91ed6aef734b256ac407c81150d01d4ebc134
parentc8d7b51b964fe5dc11a47e2851f1feeb846bae8b
selftests: mlxsw: resource_scale: Pass target count to cleanup

The scale tests are verifying behavior of mlxsw when number of instances of
some resource reaches the ASIC capacity. The number of instances is
referred to as "target" number.

No scale tests so far needed to know this target number to clean up. E.g.
the tc_flower simply removes the clsact qdisc that all the tested filters
are hooked onto, and that takes care of collecting all the filters.

However, for the RIF counter test, which is being added in a future patch,
VLAN netdevices are created. These are created as part of the test, but of
course the cleanup needs to undo them again. For that it needs to know how
many there were. To support this usage, pass the target number to the
cleanup callback.

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>
tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh