From: Ido Schimmel <idosch@nvidia.com>
To: netdev-bot+sashiko@kernel.org
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, edumazet@kernel.org, jv@jvosburgh.net,
andrew+netdev@lunn.ch, petrm@nvidia.com,
sridhar.samudrala@intel.com, jiri@resnulli.us, horms@kernel.org,
shuah@kernel.org, linux-kselftest@vger.kernel.org,
razor@blackwall.org
Subject: Re: [PATCH net-next 3/6] mlxsw: Enable LAG collector independently of distributor
Date: Thu, 19 Nov 2026 12:28:37 +0200 [thread overview]
Message-ID: <20261119102837.GA1787306@shredder> (raw)
In-Reply-To: <179507998105.3136.16224636454143398218@kernel.org>
tl;dr - I believe the patch is fine as-is.
On Thu, Nov 19, 2026 at 09:19:41AM +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] The new collection-only state (SLCOR collector on, port not in
> the SLDR distributor list), reached through…
>
> --
>
> mlxsw: Enable LAG collector independently of distributor
>
> This patch adds a collection-only state for LAG ports. When rx_enabled is
> set and tx_enabled is not, mlxsw_sp_port_lag_changed() now enables the
> SLCOR collector and removes the port from the SLDR distributor list.
> Without this, a port in COLLECTING state in an 802.3ad bond with coupled
> control disabled did not receive packets.
>
> > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> > index 815e8d8e31856..5a6dc033084d8 100644
> > --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> > +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> > @@ -4515,11 +4515,26 @@ mlxsw_sp_port_lag_col_dist_disable(struct mlxsw_sp_port *mlxsw_sp_port)
> > return err;
> > }
> >
> > +static int mlxsw_sp_port_lag_col_enable(struct mlxsw_sp_port *mlxsw_sp_port)
> > +{
> > + int err;
> > +
> > + err = mlxsw_sp_lag_dist_port_remove(mlxsw_sp_port,
> > + mlxsw_sp_port->lag_id);
> > + if (err)
> > + return err;
> > +
> > + return mlxsw_sp_lag_col_port_enable(mlxsw_sp_port,
> > + mlxsw_sp_port->lag_id);
> > +}
> > +
> > static int mlxsw_sp_port_lag_changed(struct mlxsw_sp_port *mlxsw_sp_port,
> > struct netdev_lag_lower_state_info *info)
> > {
> > if (info->tx_enabled)
> > return mlxsw_sp_port_lag_col_dist_enable(mlxsw_sp_port);
> > + else if (info->rx_enabled)
> > + return mlxsw_sp_port_lag_col_enable(mlxsw_sp_port);
>
> [Severity: Low]
> With the new collection-only state (collector on, port not in the
> distributor list), do the error paths in the two existing helpers still
> do the right thing? Both cases need a register write to fail.
>
> A move from COLLECTING to COLLECTING_DISTRIBUTING calls
> mlxsw_sp_port_lag_col_dist_enable(). If the SLDR add fails, the error path
> turns off a collector that was already correctly enabled:
>
> mlxsw_sp_port_lag_col_dist_enable() {
> ...
> err_dist_port_add:
> mlxsw_sp_lag_col_port_disable(mlxsw_sp_port, mlxsw_sp_port->lag_id);
> return err;
> }
>
> Would this drop ingress on a link that both partners negotiated as
> COLLECTING?
>
> A move from COLLECTING to ATTACHED or DETACHED calls
> mlxsw_sp_port_lag_col_dist_disable(). The SLDR remove succeeds even though
> the port was never in the list. If the SLCOR disable then fails, the error
> path adds the port to the distributor list:
>
> mlxsw_sp_port_lag_col_dist_disable() {
> ...
> err_col_port_disable:
> mlxsw_sp_lag_dist_port_add(mlxsw_sp_port, mlxsw_sp_port->lag_id);
> return err;
> }
>
> Could the device then hash LAG egress onto a port that LACP never moved to
> DISTRIBUTING, while bonding has tx disabled for it? That state matches
> neither the old LAG state nor the new one.
>
> mlxsw_sp_netdevice_port_lower_event() only logs "Failed to reflect link
> aggregation lower state change", so the hardware stays in that state until
> the next lower state event.
>
> The patch notes say the hardware and the LAG driver are out of sync
> "regardless of what the rollback does". In the second case, though, the
> rollback turns on tx distribution that neither state wants. The notes are
> also not in the commit message or in a code comment.
>
> Could the re-add be skipped when the port was in collection-only state, or
> could this limitation be documented in the commit message?
These registers don't allocate new resources, they don't have a reason
to fail and I've never seen them fail. If they failed, then the system
is in a very bad state where the state of a LAG is largely irrelevant.
I put this info under the '---' because I am trying to keep commit
messages readable for humans and not to overload them with irrelevant
info whose sole purpose is pleasing an LLM.
next prev parent reply other threads:[~2026-11-19 10:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 8:34 [PATCH net-next 0/6] bonding: 3ad: Support independent control with LAG offload Ido Schimmel
2026-11-18 8:34 ` [PATCH net-next 1/6] net: Add Rx enabled state to LAG lower state information Ido Schimmel
2026-11-18 8:34 ` [PATCH net-next 2/6] bonding: 3ad: Notify Rx state changes Ido Schimmel
2026-11-18 20:00 ` Jay Vosburgh
2026-11-19 9:03 ` Ido Schimmel
2026-11-18 8:34 ` [PATCH net-next 3/6] mlxsw: Enable LAG collector independently of distributor Ido Schimmel
2026-11-19 9:19 ` netdev-bot+sashiko
2026-11-19 10:28 ` Ido Schimmel [this message]
2026-11-18 8:34 ` [PATCH net-next 4/6] selftests: bonding: Test notifications in COLLECTING state Ido Schimmel
2026-11-18 8:34 ` [PATCH net-next 5/6] bonding: 3ad: Advertise Collecting only after collection is enabled Ido Schimmel
2026-11-19 9:19 ` netdev-bot+sashiko
2026-11-18 8:34 ` [PATCH net-next 6/6] selftests: bonding: Test that Collecting is advertised after notification Ido Schimmel
2026-11-19 9:19 ` netdev-bot+sashiko
2026-11-19 10:01 ` Ido Schimmel
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=20261119102837.GA1787306@shredder \
--to=idosch@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.org \
--cc=shuah@kernel.org \
--cc=sridhar.samudrala@intel.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