mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 23:17:41 -04:00
net/mlx5: SD, enable SD over ECPF and allow switchdev transition
Remove the restriction blocking SD on embedded CPU PFs (ECPF), enabling SD functionality on BlueField DPUs. Remove the blocker preventing SD devices from transitioning to switchdev mode. The infrastructure added in earlier patches properly handles this case. Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260612113904.537595-16-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
e3a02f3ecb
commit
7bcfb19465
@@ -4472,12 +4472,6 @@ int mlx5_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode,
|
||||
if (esw_mode_from_devlink(mode, &mlx5_mode))
|
||||
return -EINVAL;
|
||||
|
||||
if (mlx5_mode == MLX5_ESWITCH_OFFLOADS && mlx5_get_sd(esw->dev)) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Can't change E-Switch mode to switchdev when multi-PF netdev (Socket Direct) is configured.");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
/* Avoid try_lock, active/inactive mode change is not restricted */
|
||||
if (mlx5_devlink_switchdev_active_mode_change(esw, mode))
|
||||
return 0;
|
||||
|
||||
@@ -222,10 +222,6 @@ bool mlx5_sd_is_supported(struct mlx5_core_dev *dev)
|
||||
if (!mlx5_core_is_pf(dev))
|
||||
return false;
|
||||
|
||||
/* Block on embedded CPU PFs */
|
||||
if (mlx5_core_is_ecpf(dev))
|
||||
return false;
|
||||
|
||||
err = mlx5_query_nic_vport_sd_group(dev, &sd_group);
|
||||
if (err || !sd_group)
|
||||
return false;
|
||||
@@ -252,10 +248,6 @@ static int sd_init(struct mlx5_core_dev *dev)
|
||||
if (!mlx5_core_is_pf(dev))
|
||||
return 0;
|
||||
|
||||
/* Block on embedded CPU PFs */
|
||||
if (mlx5_core_is_ecpf(dev))
|
||||
return 0;
|
||||
|
||||
err = mlx5_query_nic_vport_sd_group(dev, &sd_group);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user