]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: guard the switchdev replay helpers against a NULL notifier block
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 21 Jul 2021 16:24:02 +0000 (19:24 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2021 07:26:23 +0000 (00:26 -0700)
commita48920bcae23c91c781328547fd6805d064148bc
tree7468e64352657a60673b48b2278d50abf885a010
parent4c3ab5d339ab73b49bb987a2bad72ebdd222dda3
net: bridge: guard the switchdev replay helpers against a NULL notifier block

There is a desire to make the object and FDB replay helpers optional
when moving them inside the bridge driver. For example a certain driver
might not offload host MDBs and there is no case where the replay
helpers would be of immediate use to it.

So it would be nice if we could allow drivers to pass NULL pointers for
the atomic and blocking notifier blocks, and the replay helpers to do
nothing in that case.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c
net/bridge/br_mdb.c
net/bridge/br_vlan.c