net/mlx5: Lag, don't update lag if lag isn't supported
In NICs that don't support LAG, the LAG control structure won't be
allocated. If it wasn't allocated it means LAG doesn't exists and can be
skipped.
Fixes: cac1eb2cf2
("net/mlx5: Lag, properly lock eswitch if needed")
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Родитель
897ae4b40e
Коммит
da8252d580
|
@ -927,9 +927,12 @@ void mlx5_lag_disable_change(struct mlx5_core_dev *dev)
|
|||
struct mlx5_core_dev *dev1;
|
||||
struct mlx5_lag *ldev;
|
||||
|
||||
ldev = mlx5_lag_dev(dev);
|
||||
if (!ldev)
|
||||
return;
|
||||
|
||||
mlx5_dev_list_lock();
|
||||
|
||||
ldev = mlx5_lag_dev(dev);
|
||||
dev0 = ldev->pf[MLX5_LAG_P1].dev;
|
||||
dev1 = ldev->pf[MLX5_LAG_P2].dev;
|
||||
|
||||
|
@ -946,8 +949,11 @@ void mlx5_lag_enable_change(struct mlx5_core_dev *dev)
|
|||
{
|
||||
struct mlx5_lag *ldev;
|
||||
|
||||
mlx5_dev_list_lock();
|
||||
ldev = mlx5_lag_dev(dev);
|
||||
if (!ldev)
|
||||
return;
|
||||
|
||||
mlx5_dev_list_lock();
|
||||
ldev->mode_changes_in_progress--;
|
||||
mlx5_dev_list_unlock();
|
||||
mlx5_queue_bond_work(ldev, 0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче