From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <nikolay@nvidia.com>,
Jiri Pirko <jiri@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
Rafael Richter <rafael.richter@gin.de>,
Daniel Klauer <daniel.klauer@gin.de>
Subject: Re: [RFC PATCH net-next 5/5] net: dsa: add explicit support for host bridge VLANs
Date: Sun, 13 Feb 2022 11:34:44 +0000 [thread overview]
Message-ID: <20220213113443.ios6fj253y77x4yf@skbuf> (raw)
In-Reply-To: <87wnhza7xs.fsf@waldekranz.com>
On Sun, Feb 13, 2022 at 02:09:35AM +0100, Tobias Waldekranz wrote:
> > Therefore:
> > - user ports contain only bridge port (forwarding) VLANs, and no
> > refcounting is necessary
> > - DSA ports contain both forwarding and host VLANs. Refcounting is
> > necessary among these 2 types.
> > - CPU ports contain only host VLANs. Refcounting is also necessary.
>
> This is pretty much true, though this does not take foreign interfaces
> into account. It would be great if the condifion could be refined to:
>
> The CPU port should be a member of all VLANs where either (a) the
> host is a member, or (b) at least one foreign interface is a member.
>
> I.e. in a situation like this:
>
> br0
> / \
> swp0 tap0
>
> If br0 is not a member of VLAN X, but tap0 is, then the CPU port still
> needs to be a member of X. Otherwise the (software) bridge will never
> get a chance to software forward it over the tunnel.
This is a good observation and it can be done - just in the same way as
we treat FDB entries on foregin interfaces as upstream-facing FDB entries
in DSA.
It also has implications upon the replay procedure, because if we want
this to happen, we must replay all bridge VLAN groups, not just the port
and the bridge VLANs. Again, similar to how br_switchdev_fdb_replay()
replays the entire FDB.
I can start working on these changes, but in parallel I'd also like an
Ack from Nikolay, Roopa, Jiri, Ido on the approach from patches 1-3,
since the whole refcounting thing depends on that. I think it's fairly
safe, but maybe it breaks something I haven't thought of...
next prev parent reply other threads:[~2022-02-13 11:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 21:30 [RFC PATCH net-next 0/5] Replay and offload host VLAN entries in DSA Vladimir Oltean
2022-02-09 21:30 ` [RFC PATCH net-next 1/5] net: bridge: vlan: br_vlan_add: notify switchdev only when changed Vladimir Oltean
2022-02-09 21:30 ` [RFC PATCH net-next 2/5] net: bridge: vlan: nbp_vlan_add: " Vladimir Oltean
2022-02-09 21:30 ` [RFC PATCH net-next 3/5] net: bridge: vlan: notify a switchdev deletion when modifying flags of existing VLAN Vladimir Oltean
2022-02-09 21:30 ` [RFC PATCH net-next 4/5] net: bridge: switchdev: replay VLANs present on the bridge device itself Vladimir Oltean
2022-02-09 21:30 ` [RFC PATCH net-next 5/5] net: dsa: add explicit support for host bridge VLANs Vladimir Oltean
2022-02-10 15:30 ` Vladimir Oltean
2022-02-13 1:09 ` Tobias Waldekranz
2022-02-13 11:34 ` Vladimir Oltean [this message]
2022-02-13 18:54 ` [RFC PATCH net-next 0/5] Replay and offload host VLAN entries in DSA Nikolay Aleksandrov
2022-02-13 20:02 ` Vladimir Oltean
2022-02-13 20:13 ` Vladimir Oltean
2022-02-14 9:05 ` Nikolay Aleksandrov
2022-02-14 9:59 ` Ido Schimmel
2022-02-14 10:07 ` Vladimir Oltean
2022-02-14 10:27 ` Nikolay Aleksandrov
2022-02-14 10:42 ` Vladimir Oltean
2022-02-14 11:11 ` Nikolay Aleksandrov
2022-02-14 12:04 ` Vladimir Oltean
2022-02-14 15:01 ` Nikolay Aleksandrov
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=20220213113443.ios6fj253y77x4yf@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=daniel.klauer@gin.de \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=olteanv@gmail.com \
--cc=rafael.richter@gin.de \
--cc=roopa@nvidia.com \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.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;
as well as URLs for NNTP newsgroup(s).