All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tariq Toukan" <tariqt@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next V2 5/5] net/mlx5: LAG, enable LAG over functions that do not represent a physical port
Date: Sat, 21 Nov 2026 08:02:31 +0000	[thread overview]
Message-ID: <sashiko-outbox-226816@kernel.org> (raw)
In-Reply-To: <20261120075959.2533702-6-tariqt@nvidia.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net/mlx5: LAG, empty debugfs member list in members_show()
  for virt_lag
--

commit 7460886c7aaf474929cb486d03267be648beb73f
Author: Shay Drory <shayd@nvidia.com>

net/mlx5: LAG, enable LAG over functions that do not represent a physical port

This commit enables LAG over virtual functions (such as VFs or SFs) that
sit behind a multi-uplink e-switch and do not represent a physical port.

> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
> index 193fbe47fef15..2cd2319f93189 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c

[ ... ]

> @@ -2398,7 +2404,7 @@ int mlx5_ldev_add_mdev(struct mlx5_lag *ldev,
>  	fn->group_id = group_id;
>  	dev->priv.lag = ldev;
>  
> -	if (group_id)
> +	if (group_id || ldev->virt_lag)
>  		return 0;
>  
>  	xa_set_mark(&ldev->fns, idx, MLX5_LAG_XA_MARK_PORT);

[Severity: Medium]
Does skipping MLX5_LAG_XA_MARK_PORT here leave the lag/members debugfs
file empty for virt_lag devices?

mlx5_lag_add_mdev() calls mlx5_ldev_add_debugfs(), which registers the
members file backed by members_show():

drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c:members_show() {
	...
	mutex_lock(&ldev->lock);
	mlx5_ldev_for_each(i, 0, ldev)
		seq_printf(file, "%s\n",
			   dev_name(mlx5_lag_fn(ldev, i)->dev->device));
	mutex_unlock(&ldev->lock);
	...
}

Because mlx5_ldev_for_each() iterates with MLX5_LAG_FILTER_PORTS, which
only visits entries in ldev->fns marked with MLX5_LAG_XA_MARK_PORT,
reading lag/members on a virt_lag device will print nothing.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261120075959.2533702-1-tariqt@nvidia.com?part=5

  reply	other threads:[~2026-11-21  8:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  7:59 [PATCH net-next V2 0/5] net/mlx5: LAG over VFs/SFs (virtual LAG) Tariq Toukan
2026-11-20  7:59 ` [PATCH net-next V2 1/5] net/mlx5: E-switch, add match-metadata allocator for nested VF/SF eswitches Tariq Toukan
2026-11-21  8:02   ` sashiko-bot
2026-11-20  7:59 ` [PATCH net-next V2 2/5] net/mlx5: E-switch, match master egress rule by vport metadata Tariq Toukan
2026-11-20  7:59 ` [PATCH net-next V2 3/5] net/mlx5: E-switch, drop master egress rule under a SW vport LAG Tariq Toukan
2026-11-20  7:59 ` [PATCH net-next V2 4/5] net/mlx5e: Register eswitch-manager VF/SF self-port with switch-id Tariq Toukan
2026-11-21  8:02   ` sashiko-bot
2026-11-20  7:59 ` [PATCH net-next V2 5/5] net/mlx5: LAG, enable LAG over functions that do not represent a physical port Tariq Toukan
2026-11-21  8:02   ` sashiko-bot [this message]
2026-11-21  8:02 ` [PATCH net-next V2 0/5] net/mlx5: LAG over VFs/SFs (virtual LAG) sashiko-bot

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=sashiko-outbox-226816@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tariqt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.