]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix setting of devlink traps in switchdev mode
authorAya Levin <ayal@nvidia.com>
Mon, 12 Apr 2021 14:50:08 +0000 (17:50 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 14 Apr 2021 23:12:54 +0000 (16:12 -0700)
commite49db4e662bae21a3a3e3a1ca6979abb745858d7
tree3b27494be9ecef60e6941e0aa2ea7b459a00e402
parentaea2c5f95bf1e0546f1172d63570effba2928a87
net/mlx5: Fix setting of devlink traps in switchdev mode

Prevent setting of devlink traps on the uplink while in switchdev mode.
In this mode, it is the SW switch responsibility to handle both packets
with a mismatch in destination MAC or VLAN ID. Therefore, there are no
flow steering tables to trap undesirable packets and driver crashes upon
setting a trap.

Fixes: 3f67f45619f4 ("net/mlx5: Notify on trap action by blocking event")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c