net/mlx5: Block switchdev mode while devlink traps are active
authorAya Levin <ayal@nvidia.com>
Wed, 28 Jul 2021 15:18:59 +0000 (18:18 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 10 Aug 2021 03:56:46 +0000 (20:56 -0700)
commitc85a6b8feb16c0cdbbc8d9f581c7861c4a9ac351
treef5ab2addaa54d2200b34dcfb8f2834eaf155df71
parent8ba3e4c85825c8801a2c298dcadac650a40d7137
net/mlx5: Block switchdev mode while devlink traps are active

Since switchdev mode can't support  devlink traps, verify there are
no active devlink traps before moving eswitch to switchdev mode. If
there are active traps, prevent the switchdev mode configuration.

Fixes: eb3862a0525d ("net/mlx5e: Enable traps according to link state")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c