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]
Message-ID: <6b065c09-1db8-1b80-b0ea-c66451adc8af@gmail.com>
Date:   Sat, 26 Jun 2021 19:59:52 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <olteanv@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Tobias Waldekranz <tobias@...dekranz.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Ido Schimmel <idosch@...sch.org>,
        Roopa Prabhu <roopa@...dia.com>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next 4/7] net: bridge: ignore switchdev events for LAG
 ports which didn't request replay



On 6/25/2021 11:53 AM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> There is a slight inconvenience in the switchdev replay helpers added
> recently, and this is when:
> 
> ip link add br0 type bridge
> ip link add bond0 type bond
> ip link set bond0 master br0
> bridge vlan add dev bond0 vid 100
> ip link set swp0 master bond0
> ip link set swp1 master bond0
> 
> Since the underlying driver (currently only DSA) asks for a replay of
> VLANs when swp0 and swp1 join the LAG because it is bridged, what will
> happen is that DSA will try to react twice on the VLAN event for swp0.
> This is not really a huge problem right now, because most drivers accept
> duplicates since the bridge itself does, but it will become a problem
> when we add support for replaying switchdev object deletions.
> 
> Let's fix this by adding a blank void *ctx in the replay helpers, which
> will be passed on by the bridge in the switchdev notifications. If the
> context is NULL, everything is the same as before. But if the context is
> populated with a valid pointer, the underlying switchdev driver
> (currently DSA) can use the pointer to 'see through' the bridge port
> (which in the example above is bond0) and 'know' that the event is only
> for a particular physical port offloading that bridge port, and not for
> all of them.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

With your own comment fixed:

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ