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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51cb7b6d-e19f-4251-be19-773d9e9405b4@gmail.com>
Date:   Mon, 21 Feb 2022 19:47:37 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        Ansuel Smith <ansuelsmth@...il.com>,
        Tobias Waldekranz <tobias@...dekranz.com>,
        DENG Qingfang <dqfext@...il.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        UNGLinuxDriver@...rochip.com, Jiri Pirko <jiri@...nulli.us>,
        Ivan Vecera <ivecera@...hat.com>
Subject: Re: [PATCH v4 net-next 06/11] net: dsa: create a dsa_lag structure



On 2/21/2022 1:23 PM, Vladimir Oltean wrote:
> The main purpose of this change is to create a data structure for a LAG
> as seen by DSA. This is similar to what we have for bridging - we pass a
> copy of this structure by value to ->port_lag_join and ->port_lag_leave.
> For now we keep the lag_dev, id and a reference count in it. Future
> patches will add a list of FDB entries for the LAG (these also need to
> be refcounted to work properly).
> 
> The LAG structure is created using dsa_port_lag_create() and destroyed
> using dsa_port_lag_destroy(), just like we have for bridging.
> 
> Because now, the dsa_lag itself is refcounted, we can simplify
> dsa_lag_map() and dsa_lag_unmap(). These functions need to keep a LAG in
> the dst->lags array only as long as at least one port uses it. The
> refcounting logic inside those functions can be removed now - they are
> called only when we should perform the operation.
> 
> dsa_lag_dev() is renamed to dsa_lag_by_id() and now returns the dsa_lag
> structure instead of the lag_dev net_device.
> 
> dsa_lag_foreach_port() now takes the dsa_lag structure as argument.
> 
> dst->lags holds an array of dsa_lag structures.
> 
> dsa_lag_map() now also saves the dsa_lag->id value, so that linear
> walking of dst->lags in drivers using dsa_lag_id() is no longer
> necessary. They can just look at lag.id.
> 
> dsa_port_lag_id_get() is a helper, similar to dsa_port_bridge_num_get(),
> which can be used by drivers to get the LAG ID assigned by DSA to a
> given port.
> 
> 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