Skip to content

Commit

Permalink
net/mlx5: Lag, don't use the hardcoded value of the first port
Browse files Browse the repository at this point in the history
[ Upstream commit 3fda84d ]

The cited commit didn't change the body of the loop as it should.
It shouldn't be using MLX5_LAG_P1.

Fixes: 7e978e7 ("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>
Link: https://patch.msgid.link/20240730061638.1831002-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mark-bloch authored and gregkh committed Aug 11, 2024
1 parent 91b6df6 commit d4122d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,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;
}
Expand Down

0 comments on commit d4122d1

Please sign in to comment.