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:   Sun, 18 Jul 2021 19:54:11 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Ido Schimmel <idosch@...sch.org>,
        Tobias Waldekranz <tobias@...dekranz.com>,
        Roopa Prabhu <roopa@...dia.com>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        bridge@...ts.linux-foundation.org,
        Grygorii Strashko <grygorii.strashko@...com>,
        Marek Behun <kabel@...ckhole.sk>,
        DENG Qingfang <dqfext@...il.com>
Subject: Re: [PATCH v4 net-next 12/15] net: dsa: track the number of switches
 in a tree



On 7/18/2021 2:44 PM, Vladimir Oltean wrote:
> In preparation of supporting data plane forwarding on behalf of a
> software bridge, some drivers might need to view bridges as virtual
> switches behind the CPU port in a cross-chip topology.
> 
> Give them some help and let them know how many physical switches there
> are in the tree, so that they can count the virtual switches starting
> from that number on.
> 
> Note that the first dsa_switch_ops method where this information is
> reliably available is .setup(). This is because of how DSA works:
> in a tree with 3 switches, each calling dsa_register_switch(), the first
> 2 will advance until dsa_tree_setup() -> dsa_tree_setup_routing_table()
> and exit with error code 0 because the topology is not complete. Since
> probing is parallel at this point, one switch does not know about the
> existence of the other. Then the third switch comes, and for it,
> dsa_tree_setup_routing_table() returns complete = true. This switch goes
> ahead and calls dsa_tree_setup_switches() for everybody else, calling
> their .setup() methods too. This acts as the synchronization point.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ