]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-switch, Remove dependency between sriov and eswitch mode
authorChris Mi <cmi@nvidia.com>
Mon, 30 May 2022 03:07:57 +0000 (06:07 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 2 Jul 2022 18:58:26 +0000 (11:58 -0700)
commitb4deb7a001e66c8003251ef8d095e7d48fa4787e
treea9c5d465ec6ec7ae0a4d867e1b0a002fee394ec4
parentc6cd2e96e4c9599f11445f03bcd7aa5a789e8876
net/mlx5: E-switch, Remove dependency between sriov and eswitch mode

Currently, there are three eswitch modes, none, legacy and switchdev.
None is the default mode. Remove redundant none mode as eswitch mode
should always be either legacy mode or switchdev mode.

With this patch, there are two behavior changes:

1. Legacy becomes the default mode. When querying eswitch mode using
   devlink, a valid mode is always returned.
2. When disabling sriov, the eswitch mode will not change, only vfs
   are unloaded.

Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/sriov.c
include/linux/mlx5/eswitch.h