[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220213201340.nf7n7qmuitnysmuc@skbuf>
Date: Sun, 13 Feb 2022 20:13:40 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Nikolay Aleksandrov <nikolay@...dia.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Roopa Prabhu <roopa@...dia.com>, Jiri Pirko <jiri@...dia.com>,
Ido Schimmel <idosch@...dia.com>,
Rafael Richter <rafael.richter@....de>,
Daniel Klauer <daniel.klauer@....de>,
Tobias Waldekranz <tobias@...dekranz.com>
Subject: Re: [RFC PATCH net-next 0/5] Replay and offload host VLAN entries in
DSA
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.
Powered by blists - more mailing lists