summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2021-03-16 17:03:03 +0200
committerDavid S. Miller <davem@davemloft.net>2021-03-16 15:32:23 -0700
commit0f967d9e5a20aeee51bb004295e83c2c913cceda (patch)
tree31b166d32d7cafa625c79fdc257c2ce04a3aed27
parentf0b692c4ee2fdd0d4291fe3cbde156792896895e (diff)
downloadlinux-0f967d9e5a20aeee51bb004295e83c2c913cceda.tar.bz2
selftests: mlxsw: Test egress sampling limitation on Spectrum-1 only
Make sure egress sampling configuration only fails on Spectrum-1, given that mlxsw now supports it on Spectrum-{2,3}. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rwxr-xr-xtools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh b/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
index 553cb9fad508..b4dbda706c4d 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
@@ -18,6 +18,7 @@ NUM_NETIFS=2
source $lib_dir/tc_common.sh
source $lib_dir/lib.sh
+source $lib_dir/devlink_lib.sh
switch_create()
{
@@ -166,7 +167,8 @@ matchall_sample_egress_test()
RET=0
# It is forbidden in mlxsw driver to have matchall with sample action
- # bound on egress
+ # bound on egress. Spectrum-1 specific restriction
+ [[ "$DEVLINK_VIDDID" != "15b3:cb84" ]] && return
tc qdisc add dev $swp1 clsact