public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	UNGLinuxDriver@microchip.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	linux@armlinux.org.uk
Subject: Re: [PATCH net-next 5/8] net: lan966x: Add lag support for lan966x.
Date: Mon, 27 Jun 2022 12:40:29 +0300	[thread overview]
Message-ID: <20220627094029.el2m6k6w6ypgtwqg@skbuf> (raw)
In-Reply-To: <20220627064612.vzz2sd7kxpxnprxc@soft-dev3-1.localhost>

On Mon, Jun 27, 2022 at 08:46:12AM +0200, Horatiu Vultur wrote:
> > This incorrect logic seems to have been copied from ocelot from before
> > commit a14e6b69f393 ("net: mscc: ocelot: fix incorrect balancing with
> > down LAG ports").
> > 
> > The issue is that you calculate bond_mask with only_active_ports=true.
> > This means the for_each_set_bit() will not iterate through the inactive
> > LAG ports, and won't set the bond_mask as the PGID destination for those
> > ports.
> > 
> > That isn't what is desired; as explained in that commit, inactive LAG
> > ports should be removed via the aggregation PGIDs and not via the
> > destination PGIDs. Otherwise, an FDB entry targeted towards the
> > LAG (effectively towards the "primary" LAG port, whose logical port ID
> > gives the LAG ID) will not egress even the "secondary" LAG port if the
> > primary's link is down.
> 
> Thanks for looking at this.
> That is correct, ocelot was the source of inspiration. The issue that
> you described in the mentioned commit is fixed in the last patch of this
> series.
> I will have a look at your commit and will try to integrated it. Thanks.

I figured that would be the case, although I didn't really understand
the explanation from patch 8/8 (arguably, there it is said that the
switch tries to send on the down port, not that it won't send on the up
port, which is more relevant information). But in any case, it would be
good to introduce code that works from the beginning, rather than fix it
up in a follow-up patch. I believe that the commit I referenced is a
simplification either way, since it removes the "only_active_ports"
argument from the bond mask function.

  reply	other threads:[~2022-06-27  9:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26 13:04 [PATCH net-next 0/8] net: lan966x: Add lag support Horatiu Vultur
2022-06-26 13:04 ` [PATCH net-next 1/8] net: lan966x: Add reqisters used to configure lag interfaces Horatiu Vultur
2022-06-26 13:04 ` [PATCH net-next 2/8] net: lan966x: Split lan966x_fdb_event_work Horatiu Vultur
2022-06-26 13:04 ` [PATCH net-next 3/8] net: lan966x: Expose lan966x_switchdev_nb and lan966x_switchdev_blocking_nb Horatiu Vultur
2022-06-26 13:04 ` [PATCH net-next 4/8] net: lan966x: Extend lan966x_foreign_bridging_check Horatiu Vultur
2022-06-26 13:04 ` [PATCH net-next 5/8] net: lan966x: Add lag support for lan966x Horatiu Vultur
2022-06-26 14:11   ` Vladimir Oltean
2022-06-27  6:46     ` Horatiu Vultur
2022-06-27  9:40       ` Vladimir Oltean [this message]
2022-06-26 13:04 ` [PATCH net-next 6/8] net: lan966x: Extend FDB to support also lag Horatiu Vultur
2022-06-26 13:04 ` [PATCH net-next 7/8] net: lan966x: Extend MAC to support also lag interfaces Horatiu Vultur
2022-06-26 13:04 ` [PATCH net-next 8/8] net: lan966x: Update PGID when lag ports are changing link status Horatiu Vultur

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=20220627094029.el2m6k6w6ypgtwqg@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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