[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36f19500-63d8-861f-9624-c3874cea460f@nvidia.com>
Date: Wed, 16 Feb 2022 13:27:34 +0200
From: Nikolay Aleksandrov <nikolay@...dia.com>
To: Vladimir Oltean <vladimir.oltean@....com>, <netdev@...r.kernel.org>
CC: 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: [PATCH v3 net-next 05/11] net: bridge: switchdev: differentiate
new VLANs from changed ones
On 15/02/2022 19:02, Vladimir Oltean wrote:
> br_switchdev_port_vlan_add() currently emits a SWITCHDEV_PORT_OBJ_ADD
> event with a SWITCHDEV_OBJ_ID_PORT_VLAN for 2 distinct cases:
>
> - a struct net_bridge_vlan got created
> - an existing struct net_bridge_vlan was modified
>
> This makes it impossible for switchdev drivers to properly balance
> PORT_OBJ_ADD with PORT_OBJ_DEL events, so if we want to allow that to
> happen, we must provide a way for drivers to distinguish between a
> VLAN with changed flags and a new one.
>
> Annotate struct switchdev_obj_port_vlan with a "bool changed" that
> distinguishes the 2 cases above.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> v2->v3:
> - drop "old_flags" from struct switchdev_obj_port_vlan, nobody needs it
> now, in v2 only DSA needed it to filter out BRENTRY transitions, that
> is now solved cleaner.
> v1->v2:
> - patch is new, logically replaces the need for "net: bridge: vlan:
> notify a switchdev deletion when modifying flags of existing VLAN"
>
> include/net/switchdev.h | 7 +++++++
> net/bridge/br_private.h | 6 +++---
> net/bridge/br_switchdev.c | 3 ++-
> net/bridge/br_vlan.c | 10 +++++-----
> 4 files changed, 17 insertions(+), 9 deletions(-)
>
Acked-by: Nikolay Aleksandrov <nikolay@...dia.com>
Powered by blists - more mailing lists