lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Feb 2022 13:34:45 +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 06/11] net: bridge: make
 nbp_switchdev_unsync_objs() follow reverse order of sync()

On 15/02/2022 19:02, Vladimir Oltean wrote:
> There may be switchdev drivers that can add/remove a FDB or MDB entry
> only as long as the VLAN it's in has been notified and offloaded first.
> The nbp_switchdev_sync_objs() method satisfies this requirement on
> addition, but nbp_switchdev_unsync_objs() first deletes VLANs, then
> deletes MDBs and FDBs. Reverse the order of the function calls to cater
> to this requirement.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> v2->v3: none
> v1->v2: patch is new
> 
>  net/bridge/br_switchdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
> index fb5115387d82..b7c13f8cfce5 100644
> --- a/net/bridge/br_switchdev.c
> +++ b/net/bridge/br_switchdev.c
> @@ -707,11 +707,11 @@ static void nbp_switchdev_unsync_objs(struct net_bridge_port *p,
>  	struct net_device *br_dev = p->br->dev;
>  	struct net_device *dev = p->dev;
>  
> -	br_switchdev_vlan_replay(br_dev, dev, ctx, false, blocking_nb, NULL);
> +	br_switchdev_fdb_replay(br_dev, ctx, false, atomic_nb);
>  
>  	br_switchdev_mdb_replay(br_dev, dev, ctx, false, blocking_nb, NULL);
>  
> -	br_switchdev_fdb_replay(br_dev, ctx, false, atomic_nb);
> +	br_switchdev_vlan_replay(br_dev, dev, ctx, false, blocking_nb, NULL);
>  }
>  
>  /* Let the bridge know that this port is offloaded, so that it can assign a

Now correctly matches the sync order.

Acked-by: Nikolay Aleksandrov <nikolay@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ