From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Nikolay Aleksandrov <nikolay@nvidia.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>, Jiri Pirko <jiri@nvidia.com>,
Ido Schimmel <idosch@nvidia.com>,
Rafael Richter <rafael.richter@gin.de>,
Daniel Klauer <daniel.klauer@gin.de>,
Tobias Waldekranz <tobias@waldekranz.com>
Subject: Re: [RFC PATCH net-next 0/5] Replay and offload host VLAN entries in DSA
Date: Sun, 13 Feb 2022 20:13:40 +0000 [thread overview]
Message-ID: <20220213201340.nf7n7qmuitnysmuc@skbuf> (raw)
In-Reply-To: <20220213200255.3iplletgf4daey54@skbuf>
On Sun, Feb 13, 2022 at 10:02:55PM +0200, Vladimir Oltean wrote:
> (a) call br_vlan_get_info() from the DSA switchdev notification handler
> to figure out whether the VLAN is new or not. As far as I can see in
> __vlan_add(), br_switchdev_port_vlan_add() is called before the
> insertion of the VLAN into &vg->vlan_hash, so the absence from there
> could be used as an indicator that the VLAN is new, and that the
> refcount needs to be bumped, regardless of knowing exactly which
> bridge or bridge port the VLAN came from. The important part is that
> it isn't just a flag change, for which we don't want to bump the
> refcount, and that we can rely on the bridge database and not keep a
> separate one. The disadvantage seems to be that the solution is a
> bit fragile and puts a bit too much pressure on the bridge code
> structure, if it even works (need to try).
Ah, this is too fragile, I thought of a case where it's broken already:
for VLAN replays, it's technically a 'new VLAN' not a changed one, yet
br_vlan_get_info() will still find it so it will get detected as changed.
So the bridge has to pass the information that the switchdev notifier is
just for a change of flags somehow.
next prev parent reply other threads:[~2022-02-13 20:13 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
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 [this message]
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=20220213201340.nf7n7qmuitnysmuc@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