Message ID | 20240730061638.1831002-5-tariqt@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 3fda84dc090390573cfbd0b1d70372663315de21 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlx5 misc fixes 2024-07-30 | expand |
On 30.07.2024 08:16, Tariq Toukan wrote: > From: Mark Bloch <mbloch@nvidia.com> > > The cited commit didn't change the body of the loop as it should. > It shouldn't be using MLX5_LAG_P1. > > Fixes: 7e978e7714d6 ("net/mlx5: Lag, use actual number of lag ports") > Signed-off-by: Mark Bloch <mbloch@nvidia.com> > Signed-off-by: Tariq Toukan <tariqt@nvidia.com> > --- Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> > drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c > index d0871c46b8c5..cf8045b92689 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c > @@ -1538,7 +1538,7 @@ u8 mlx5_lag_get_slave_port(struct mlx5_core_dev *dev, > goto unlock; > > for (i = 0; i < ldev->ports; i++) { > - if (ldev->pf[MLX5_LAG_P1].netdev == slave) { > + if (ldev->pf[i].netdev == slave) { > port = i; > break; > }
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c index d0871c46b8c5..cf8045b92689 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c @@ -1538,7 +1538,7 @@ u8 mlx5_lag_get_slave_port(struct mlx5_core_dev *dev, goto unlock; for (i = 0; i < ldev->ports; i++) { - if (ldev->pf[MLX5_LAG_P1].netdev == slave) { + if (ldev->pf[i].netdev == slave) { port = i; break; }