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: <d06efa97-f9cf-3a3a-963b-3b15e7803e87@ti.com>
Date:   Fri, 12 Feb 2021 19:06:26 +0200
From:   Grygorii Strashko <grygorii.strashko@...com>
To:     Vladimir Oltean <olteanv@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>
CC:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <bridge@...ts.linux-foundation.org>,
        Roopa Prabhu <roopa@...dia.com>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Ido Schimmel <idosch@...sch.org>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        <UNGLinuxDriver@...rochip.com>, Vadym Kochan <vkochan@...vell.com>,
        Taras Chornyi <tchornyi@...vell.com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Ivan Vecera <ivecera@...hat.com>, <linux-omap@...r.kernel.org>
Subject: Re: [PATCH v5 net-next 05/10] net: switchdev: pass flags and mask to
 both {PRE_,}BRIDGE_FLAGS attributes



On 12/02/2021 17:15, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> This switchdev attribute offers a counterproductive API for a driver
> writer, because although br_switchdev_set_port_flag gets passed a
> "flags" and a "mask", those are passed piecemeal to the driver, so while
> the PRE_BRIDGE_FLAGS listener knows what changed because it has the
> "mask", the BRIDGE_FLAGS listener doesn't, because it only has the final
> value. But certain drivers can offload only certain combinations of
> settings, like for example they cannot change unicast flooding
> independently of multicast flooding - they must be both on or both off.
> The way the information is passed to switchdev makes drivers not
> expressive enough, and unable to reject this request ahead of time, in
> the PRE_BRIDGE_FLAGS notifier, so they are forced to reject it during
> the deferred BRIDGE_FLAGS attribute, where the rejection is currently
> ignored.
> 
> This patch also changes drivers to make use of the "mask" field for edge
> detection when possible.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> Changes in v5:
> Rebased on top of AM65 CPSW driver.
> 
> Changes in v4:
> Patch is new.
> 
>   .../marvell/prestera/prestera_switchdev.c     | 23 +++++----
>   .../mellanox/mlxsw/spectrum_switchdev.c       | 50 +++++++++++--------
>   drivers/net/ethernet/rocker/rocker_main.c     | 10 ++--
>   drivers/net/ethernet/ti/am65-cpsw-switchdev.c | 24 +++++----
>   drivers/net/ethernet/ti/cpsw_switchdev.c      | 24 +++++----
>   drivers/staging/fsl-dpaa2/ethsw/ethsw.c       | 34 ++++++++-----
>   include/net/switchdev.h                       |  7 ++-
>   net/bridge/br_switchdev.c                     |  6 +--
>   net/dsa/dsa_priv.h                            |  6 ++-
>   net/dsa/port.c                                | 34 +++++++------
>   10 files changed, 129 insertions(+), 89 deletions(-)
> 

Reviewed-by: Grygorii Strashko <grygorii.strashko@...com>

-- 
Best regards,
grygorii

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ