From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>
Subject: Re: [PATCH net-next v2 0/7] net: lan966x: Add lag support
Date: Fri, 1 Jul 2022 16:34:15 +0000 [thread overview]
Message-ID: <20220701163414.q3dpd32a2hwi6dtg@skbuf> (raw)
In-Reply-To: <20220630190846.aqagifacrleejrjc@soft-dev3-1.localhost>
On Thu, Jun 30, 2022 at 09:08:46PM +0200, Horatiu Vultur wrote:
> > I've downloaded and applied your patches and I have some general feedback.
> > Some of it relates to changes which were not made and hence I couldn't
> > have commented on the patches themselves, so I'm posting it here.
> >
> > 1. switchdev_bridge_port_offload() returns an error code if object
> > replay failed, or if it couldn't get the port parent id, or if the user
> > tries to join a lan966x port and a port belonging to another switchdev
> > driver to the same LAG. It would be good to propagate this error and not
> > ignore it.
>
> Yes, I will do that.
>
> What about the case when the other port is not a switchdev port. For
> example:
> ip link set dev eth0 master bond0
> ip link set dev dummy master bond0
> ip link set dev bond0 master br0
>
> At the last line, I was expecting to get an error.
switchdev_bridge_port_offload() currently only detects mismatched port
parent IDs, so it will not detect this condition where one bond slave is
switchdev and the other isn't. This is because the non-switchdev bond
slave does not even call switchdev_bridge_port_offload(), it's completely
silent from the perspective of the bridge.
Fact is that we don't have a common layer that enforces all common sense
netdev adjacency restrictions with switchdev, and that is one of the big
problems of the system.
> > 6. You are missing LAG FDB migration logic in lan966x_lag_port_join().
> > Specifically, you assume that the lan966x_lag_first_port() will never
> > change, probably because you just make the switch ports join the LAG in
> > the order 1, 2, 3. But they can also join in the order 3, 2, 1.
>
> It would work, but there will be problems when the ports start to leave
> the LAG.
> It would work because all the ports under the LAG will have the same
> value in PGID_ID for DST_IDX. So if the MAC entry points to any of
> this entries will be OK.
OK, I forgot DEST_IDX selects PGID and not logical port ID directly.
> The problem is when the port leaves the LAG, if the MAC entry points
> to the port that left the LAG then is not working anymore.
> I will fix this in the next series.
prev parent reply other threads:[~2022-07-01 16:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 20:13 [PATCH net-next v2 0/7] net: lan966x: Add lag support Horatiu Vultur
2022-06-27 20:13 ` [PATCH net-next v2 1/7] net: lan966x: Add reqisters used to configure lag interfaces Horatiu Vultur
2022-06-27 20:13 ` [PATCH net-next v2 2/7] net: lan966x: Split lan966x_fdb_event_work Horatiu Vultur
2022-06-27 20:13 ` [PATCH net-next v2 3/7] net: lan966x: Expose lan966x_switchdev_nb and lan966x_switchdev_blocking_nb Horatiu Vultur
2022-06-27 20:13 ` [PATCH net-next v2 4/7] net: lan966x: Extend lan966x_foreign_bridging_check Horatiu Vultur
2022-06-27 20:13 ` [PATCH net-next v2 5/7] net: lan966x: Add lag support for lan966x Horatiu Vultur
2022-06-27 20:13 ` [PATCH net-next v2 6/7] net: lan966x: Extend FDB to support also lag Horatiu Vultur
2022-06-27 20:13 ` [PATCH net-next v2 7/7] net: lan966x: Extend MAC to support also lag interfaces Horatiu Vultur
2022-06-29 12:26 ` [PATCH net-next v2 0/7] net: lan966x: Add lag support Vladimir Oltean
2022-06-30 19:08 ` Horatiu Vultur
2022-07-01 16:34 ` Vladimir Oltean [this message]
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=20220701163414.q3dpd32a2hwi6dtg@skbuf \
--to=vladimir.oltean@nxp.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=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