Re: [PATCH v3 net-next 5/9] net: dsa: lantiq_gswip: serialize access to the PCE table

From
Florian Fainelli <f.fainelli@gmail.com>
Date
2021-10-22 17:31:55
Reply to
Vladimir Oltean, 2021-10-22
On 10/22/21 10:27 AM, Vladimir Oltean wrote:
Looking at the code, the GSWIP switch appears to hold bridging service
structures (VLANs, FDBs, forwarding rules) in PCE table entries.
Hardware access to the PCE table is non-atomic, and is comprised of
several register reads and writes.

These accesses are currently serialized by the rtnl_lock, but DSA is
changing its driver API and that lock will no longer be held when
calling ->port_fdb_add() and ->port_fdb_del().

So this driver needs to serialize the access to the PCE table using its
own locking scheme. This patch adds that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Looks like we are missing a mutex_init() for this driver, otherwise, LGTM!
-- 
Florian
Thread (20 messages) 20 messages, 4 authors, last reply 2021-10-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help