net/mlx5: Lag, Check shared fdb before creating MultiPort E-Switch
[ Upstream commit 32966984bee1defd9f5a8f9be274d7c32f911ba1 ]
Currently, MultiPort E-Switch is requesting to create a LAG with shared
FDB without checking the LAG is supporting shared FDB.
Add the check.
Fixes: a32327a3a0
("net/mlx5: Lag, Control MultiPort E-Switch single FDB mode")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/1741644104-97767-5-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4b1a0ee616
commit
4e79d865f0
@@ -823,7 +823,7 @@ void mlx5_disable_lag(struct mlx5_lag *ldev)
|
||||
mlx5_eswitch_reload_ib_reps(ldev->pf[i].dev->priv.eswitch);
|
||||
}
|
||||
|
||||
static bool mlx5_shared_fdb_supported(struct mlx5_lag *ldev)
|
||||
bool mlx5_lag_shared_fdb_supported(struct mlx5_lag *ldev)
|
||||
{
|
||||
struct mlx5_core_dev *dev;
|
||||
int i;
|
||||
@@ -900,7 +900,7 @@ static void mlx5_do_bond(struct mlx5_lag *ldev)
|
||||
}
|
||||
|
||||
if (do_bond && !__mlx5_lag_is_active(ldev)) {
|
||||
bool shared_fdb = mlx5_shared_fdb_supported(ldev);
|
||||
bool shared_fdb = mlx5_lag_shared_fdb_supported(ldev);
|
||||
|
||||
roce_lag = mlx5_lag_is_roce_lag(ldev);
|
||||
|
||||
|
@@ -92,6 +92,7 @@ mlx5_lag_is_ready(struct mlx5_lag *ldev)
|
||||
return test_bit(MLX5_LAG_FLAG_NDEVS_READY, &ldev->state_flags);
|
||||
}
|
||||
|
||||
bool mlx5_lag_shared_fdb_supported(struct mlx5_lag *ldev);
|
||||
bool mlx5_lag_check_prereq(struct mlx5_lag *ldev);
|
||||
void mlx5_modify_lag(struct mlx5_lag *ldev,
|
||||
struct lag_tracker *tracker);
|
||||
|
@@ -81,7 +81,8 @@ static int enable_mpesw(struct mlx5_lag *ldev)
|
||||
if (mlx5_eswitch_mode(dev0) != MLX5_ESWITCH_OFFLOADS ||
|
||||
!MLX5_CAP_PORT_SELECTION(dev0, port_select_flow_table) ||
|
||||
!MLX5_CAP_GEN(dev0, create_lag_when_not_master_up) ||
|
||||
!mlx5_lag_check_prereq(ldev))
|
||||
!mlx5_lag_check_prereq(ldev) ||
|
||||
!mlx5_lag_shared_fdb_supported(ldev))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
err = mlx5_mpesw_metadata_set(ldev);
|
||||
|
Reference in New Issue
Block a user