]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit30959b2d5c8c6f89429b8f8c3616aeed9c009640
treef5ab2addaa54d2200b34dcfb8f2834eaf155df71
parentdd627e71aaa1c7927e7e0e7e8113074e0e869082
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: 5db354b50dd1 ("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