selftests: mlxsw: Add a scale test for RIF MAC profiles
authorDanielle Ratson <danieller@nvidia.com>
Tue, 26 Oct 2021 09:42:22 +0000 (12:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Oct 2021 12:35:58 +0000 (13:35 +0100)
commit152f98e7c5cb472e37d44ff8bb07029e77e9508d
tree921044a4c20d7346aa34179de6d178a43b124a0b
parent1c375ffb2efab992b74fb1801c2e0bb2051a6e6e
selftests: mlxsw: Add a scale test for RIF MAC profiles

Query the maximum number of supported RIF MAC profiles using
devlink-resource and verify that all available MAC profiles can be utilized
and that an error is generated when user space tries to exceed this number.

Output example in Spectrum-2:

$ TESTS='rif_mac_profile' ./resource_scale.sh
TEST: 'rif_mac_profile' 4                                           [ OK ]
TEST: 'rif_mac_profile' overflow 5                                  [ OK ]

Signed-off-by: Danielle Ratson <danieller@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/rif_mac_profile_scale.sh [new file with mode: 0644]
tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
tools/testing/selftests/drivers/net/mlxsw/spectrum-2/rif_mac_profile_scale.sh [new file with mode: 0644]
tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh
tools/testing/selftests/drivers/net/mlxsw/spectrum/rif_mac_profile_scale.sh [new file with mode: 0644]