Commit a6491744 authored by Aviv Heller's avatar Aviv Heller Committed by Saeed Mahameed
Browse files

net/mlx5: Fix LAG requirement when CONFIG_MLX5_ESWITCH is off

If CONFIG_MLX5_ESWITCH is not defined, test for SR-IOV being disabled,
instead of calling e-switch LAG prereq routine.

Since LAG with SRIOV is allowed only when switchdev mode is on.

Fixes: eff849b2

 ("net/mlx5: Allow/disallow LAG according to pre-req only")
Signed-off-by: default avatarAviv Heller <>
Signed-off-by: default avatarSaeed Mahameed <>
parent 0a5b5891
......@@ -291,12 +291,15 @@ static int mlx5_deactivate_lag(struct mlx5_lag *ldev)
static bool mlx5_lag_check_prereq(struct mlx5_lag *ldev)
if (ldev->pf[0].dev &&
ldev->pf[1].dev &&
mlx5_esw_lag_prereq(ldev->pf[0].dev, ldev->pf[1].dev))
return true;
if (!ldev->pf[0].dev || !ldev->pf[1].dev)
return false;
return mlx5_esw_lag_prereq(ldev->pf[0].dev, ldev->pf[1].dev);
return (!mlx5_sriov_is_enabled(ldev->pf[0].dev) &&
static void mlx5_lag_add_ib_devices(struct mlx5_lag *ldev)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment