Skip to content

Commit 03027cd

Browse files
mark-blochNipaLocal
authored and
NipaLocal
committed
net/mlx5: Lag, don't use the hardcoded value of the first port
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 <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Wojciech Drewek <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 73ac123 commit 03027cd

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/lag

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ u8 mlx5_lag_get_slave_port(struct mlx5_core_dev *dev,
15381538
goto unlock;
15391539

15401540
for (i = 0; i < ldev->ports; i++) {
1541-
if (ldev->pf[MLX5_LAG_P1].netdev == slave) {
1541+
if (ldev->pf[i].netdev == slave) {
15421542
port = i;
15431543
break;
15441544
}

0 commit comments

Comments
 (0)