netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tariq Toukan <tariqt@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>
Cc: <netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>,
	Gal Pressman <gal@nvidia.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Mark Bloch <mbloch@nvidia.com>, Tariq Toukan <tariqt@nvidia.com>
Subject: [PATCH net 4/8] net/mlx5: Lag, don't use the hardcoded value of the first port
Date: Tue, 30 Jul 2024 09:16:33 +0300	[thread overview]
Message-ID: <20240730061638.1831002-5-tariqt@nvidia.com> (raw)
In-Reply-To: <20240730061638.1831002-1-tariqt@nvidia.com>

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>
---
 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;
 		}
-- 
2.44.0


  parent reply	other threads:[~2024-07-30  6:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30  6:16 [PATCH net 0/8] mlx5 misc fixes 2024-07-30 Tariq Toukan
2024-07-30  6:16 ` [PATCH net 1/8] net/mlx5: Always drain health in shutdown callback Tariq Toukan
2024-07-30  9:33   ` Wojciech Drewek
2024-07-30  6:16 ` [PATCH net 2/8] net/mlx5: Fix error handling in irq_pool_request_irq Tariq Toukan
2024-07-30  9:34   ` Wojciech Drewek
2024-07-30  6:16 ` [PATCH net 3/8] net/mlx5: DR, Fix 'stack guard page was hit' error in dr_rule Tariq Toukan
2024-07-30  9:36   ` Wojciech Drewek
2024-07-30  6:16 ` Tariq Toukan [this message]
2024-07-30  9:37   ` [PATCH net 4/8] net/mlx5: Lag, don't use the hardcoded value of the first port Wojciech Drewek
2024-07-30  6:16 ` [PATCH net 5/8] net/mlx5: Fix missing lock on sync reset reload Tariq Toukan
2024-07-30  9:41   ` Wojciech Drewek
2024-07-30  6:16 ` [PATCH net 6/8] net/mlx5e: Require mlx5 tc classifier action support for IPsec prio capability Tariq Toukan
2024-07-30  9:45   ` Wojciech Drewek
2024-07-30  6:16 ` [PATCH net 7/8] net/mlx5e: Fix CT entry update leaks of modify header context Tariq Toukan
2024-07-30  9:49   ` Wojciech Drewek
2024-07-30  6:16 ` [PATCH net 8/8] net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys Tariq Toukan
2024-07-30  9:50   ` Wojciech Drewek
2024-08-01  1:10 ` [PATCH net 0/8] mlx5 misc fixes 2024-07-30 patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240730061638.1831002-5-tariqt@nvidia.com \
    --to=tariqt@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).