mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] net/mlx5: Lag, Return error when enabling MPESW without LAG support
@ 2026-11-10 11:43 Tariq Toukan
  2026-11-10 11:46 ` netdev-bot+sinfo
  0 siblings, 1 reply; 2+ messages in thread
From: Tariq Toukan @ 2026-11-10 11:43 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Gal Pressman, Leon Romanovsky, open list, linux-rdma,
	Maor Dickman, Mark Bloch, Moshe Shemesh, Or Har-Toov, Roi Dayan,
	Saeed Mahameed, Shay Drori, Tariq Toukan, Uri Dar

From: Uri Dar <udar@nvidia.com>

When firmware reports a function as not LAG capable (lag_master=0 or
num_lag_ports < 2), mlx5_lag_add_mdev() creates no LAG object for it.
Enabling multiport E-Switch on such a device returns 0 from
mlx5_lag_mpesw_queue_work(), so
"devlink dev param set ... esw_multiport value true" reports success
although nothing was enabled, and a following "devlink dev param show"
still reports false.

Return -EOPNOTSUPP instead. mlx5_lag_mpesw_disable() ignores the return
value, so disabling keeps its current behavior.

Fixes: a32327a3a02c ("net/mlx5: Lag, Control MultiPort E-Switch single FDB mode")
Signed-off-by: Uri Dar <udar@nvidia.com>
Reviewed-by: Shay Drori <shayd@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
index abf72026c751..549d31812c2f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
@@ -227,7 +227,7 @@ static int mlx5_lag_mpesw_queue_work(struct mlx5_core_dev *dev,
 	int err = 0;
 
 	if (!ldev)
-		return 0;
+		return -EOPNOTSUPP;
 
 	work = kzalloc_obj(*work);
 	if (!work)

base-commit: b71c101bbb9814d163c00234d43c41f0a17907d4
-- 
2.44.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net/mlx5: Lag, Return error when enabling MPESW without LAG support
  2026-11-10 11:43 [PATCH net] net/mlx5: Lag, Return error when enabling MPESW without LAG support Tariq Toukan
@ 2026-11-10 11:46 ` netdev-bot+sinfo
  0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-10 11:46 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni, Gal Pressman, Leon Romanovsky, open list,
	linux-rdma, Maor Dickman, Mark Bloch, Moshe Shemesh, Or Har-Toov,
	Roi Dayan, Saeed Mahameed, Shay Drori, Uri Dar

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - What hardware the change was tested on. For driver fixes please
   mention the device (and if relevant firmware version) used for
   testing, or say that the change was not tested on real hardware.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-10 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 11:43 [PATCH net] net/mlx5: Lag, Return error when enabling MPESW without LAG support Tariq Toukan
2026-11-10 11:46 ` netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®