Thread (20 messages) flat view 20 messages, 4 authors, 2021-10-22

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

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help