bridge: del external_learned fdbs from device on flush or ageout
authorScott Feldman <sfeldma@gmail.com>
Sun, 14 Jun 2015 18:33:11 +0000 (11:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jun 2015 00:08:49 +0000 (17:08 -0700)
commitb4ad7baa01970d2c5096fbbcb0c593e199c6f18b
tree62322b92940372483784bbb5981b9c3d27af9cff
parent023033b1ec821951795d982a81cb942b879d276e
bridge: del external_learned fdbs from device on flush or ageout

We need to delete from offload the device externally learnded fdbs when any
one of these events happen:

1) Bridge ages out fdb.  (When bridge is doing ageing vs. device doing
ageing.  If device is doing ageing, it would send SWITCHDEV_FDB_DEL
directly).

2) STP state change flushes fdbs on port.

3) User uses sysfs interface to flush fdbs from bridge or bridge port:

echo 1 >/sys/class/net/BR_DEV/bridge/flush
echo 1 >/sys/class/net/BR_PORT/brport/flush

4) Offload driver send event SWITCHDEV_FDB_DEL to delete fdb entry.

For rocker, we can now get called to delete fdb entry in wait and nowait
contexts, so set NOWAIT flag when deleting fdb entry.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/switchdev.txt
drivers/net/ethernet/rocker/rocker.c
net/bridge/br_fdb.c