net: dsa: use switchdev_handle_fdb_{add,del}_to_device
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 19 Jul 2021 13:51:40 +0000 (16:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jul 2021 14:04:27 +0000 (07:04 -0700)
commitb94dc99c0ddb74713da315853919393fb3e63b96
tree9f839966890a4400be58605618b5d98bd36a1be6
parent8ca07176ab00a6d06a9b254dcbb2514b4d607e9c
net: dsa: use switchdev_handle_fdb_{add,del}_to_device

Using the new fan-out helper for FDB entries installed on the software
bridge, we can install host addresses with the proper refcount on the
CPU port, such that this case:

ip link set swp0 master br0
ip link set swp1 master br0
ip link set swp2 master br0
ip link set swp3 master br0
ip link set br0 address 00:01:02:03:04:05
ip link set swp3 nomaster

works properly and the br0 address remains installed as a host entry
with refcount 3 instead of getting deleted.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa_priv.h
net/dsa/slave.c