From: netdev-bot+sashiko@kernel.org
To: tariqt@nvidia.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com,
agoldberger@nvidia.com, edwards@nvidia.com, gal@nvidia.com,
kees@kernel.org, leon@kernel.org, linux-kernel@vger.kernel.org,
linux-rdma@vger.kernel.org, msanalla@nvidia.com,
mbloch@nvidia.com, ohartoov@nvidia.com, parav@nvidia.com,
phaddad@nvidia.com, saeedm@nvidia.com, shayd@nvidia.com,
horms@kernel.org
Subject: Re: [PATCH net V2 3/4] net/mlx5: SD, unload reps on shared FDB create error path
Date: Wed, 09 Sep 2026 12:15:45 +0000 [thread overview]
Message-ID: <178895614589.219967.9154250282246662158@kernel.org> (raw)
In-Reply-To: <20260906071332.3759199-4-tariqt@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:
Critical: 0 · High: 0 · Medium: 0 · Low: 1
- [Low] Commit message of "net/mlx5: SD, unload reps on shared FDB create
error path" describes the change only as symmetry ("The teardown path…
--
net/mlx5: SD, unload reps on shared FDB create error path
The SD branch of mlx5_lag_shared_fdb_create() now unloads the
representors on the error path after destroying the single FDB, matching
what mlx5_lag_shared_fdb_destroy() does. The patch carries a Fixes: tag
for 68c2dd59a6c7 ("net/mlx5: E-Switch, Tie rep load/unload to SD LAG
state").
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/shared_fdb.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/shared_fdb.c
> index 6b4ad3c53f2f3..424040918fa37 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/shared_fdb.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/shared_fdb.c
> @@ -270,6 +270,7 @@ int mlx5_lag_shared_fdb_create(struct mlx5_lag *ldev,
> pf->sd_fdb_active = false;
> }
> mlx5_lag_destroy_single_fdb_filter(ldev, group_id);
> + mlx5_lag_unload_reps_from_locked(ldev, filter);
[Severity: Low]
This isn't a bug in the code, but could the changelog say what state was
actually left behind before this call was added?
The commit message only describes symmetry:
The teardown path unloads the representors; align the create error
path to do the same.
In the SD branch, mlx5_lag_shared_fdb_create() sets sd_fdb_active for
every group member before the rescan and the reps reload:
mlx5_lag_for_each(i, 0, ldev, filter) {
pf = mlx5_lag_pf(ldev, i);
pf->sd_fdb_active = true;
}
...
mlx5_lag_rescan_dev_locked(ldev, dev0, true);
err = mlx5_lag_reload_ib_reps_from_locked(ldev, 0, filter, false);
if (err) {
mlx5_core_err(dev0, "Failed to enable lag\n");
goto err_rescan_drivers;
}
Non-uplink reps are only skipped while SD LAG is inactive, per
mlx5_esw_offloads_rep_load() in eswitch_offloads.c:
if (vport_num != MLX5_VPORT_UPLINK &&
mlx5_get_sd(esw->dev) && !mlx5_lag_is_active(esw->dev))
return 0;
so reps do get loaded in that window. If
mlx5_lag_reload_ib_reps_from_locked() then fails, err_rescan_drivers
clears pf->sd_fdb_active and calls
mlx5_lag_destroy_single_fdb_filter(), which left the VF/SF reps loaded
while SD LAG is no longer active, i.e. exactly the state that
68c2dd59a6c7 was written to avoid.
Since this is Fixes-tagged and therefore stable material, would it help
to spell that resulting state out in the changelog?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260906071332.3759199-1-tariqt%40nvidia.com
next prev parent reply other threads:[~2026-09-09 12:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 7:13 [PATCH net V2 0/4] net/mlx5: SD LAG and devcom stability fixes Tariq Toukan
2026-09-06 7:13 ` [PATCH net V2 1/4] net/mlx5: SD, serialize SD LAG init/cleanup against LAG mode changes Tariq Toukan
2026-09-09 12:15 ` netdev-bot+sashiko
2026-09-10 14:26 ` Shay Drori
2026-09-10 11:08 ` Paolo Abeni
2026-09-06 7:13 ` [PATCH net V2 2/4] net/mlx5: devcom, Base component size on linked devices Tariq Toukan
2026-09-06 7:13 ` [PATCH net V2 3/4] net/mlx5: SD, unload reps on shared FDB create error path Tariq Toukan
2026-09-09 12:15 ` netdev-bot+sashiko [this message]
2026-09-10 14:27 ` Shay Drori
2026-09-06 7:13 ` [PATCH net V2 4/4] net/mlx5: LAG, reload IB reps of LAG master before the rest Tariq Toukan
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=178895614589.219967.9154250282246662158@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=agoldberger@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=edwards@nvidia.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=msanalla@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=ohartoov@nvidia.com \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=phaddad@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=shayd@nvidia.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox