]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: warn about dsa_port and dsa_switch bit fields being non atomic
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 5 Jan 2022 22:11:50 +0000 (00:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jan 2022 12:16:21 +0000 (12:16 +0000)
commit39d0fc6c494f2ef37bf3e25f89bf515b0ea51627
tree2139f98e543630040123b74a001db02449d3cfc6
parent950c30a63a5948b908052268ab6d6570c71bef10
net: dsa: warn about dsa_port and dsa_switch bit fields being non atomic

As discussed during review here:
https://patchwork.kernel.org/project/netdevbpf/patch/20220105132141.2648876-3-vladimir.oltean@nxp.com/

we should inform developers about pitfalls of concurrent access to the
boolean properties of dsa_switch and dsa_port, now that they've been
converted to bit fields. No other measure than a comment needs to be
taken, since the code paths that update these bit fields are not
concurrent with each other.

Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h