net: bridge: fdb: add support for fine-grained flushing
authorNikolay Aleksandrov <razor@blackwall.org>
Wed, 13 Apr 2022 10:51:59 +0000 (13:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2022 11:46:26 +0000 (12:46 +0100)
commit1f78ee14eeac03952ec765cea7ce23cbf12d6894
tree26205da8814352b7c6e00fc0b416e3661084782b
parentedaef191722439591bfba75b4e5650bfd39c9123
net: bridge: fdb: add support for fine-grained flushing

Add the ability to specify exactly which fdbs to be flushed. They are
described by a new structure - net_bridge_fdb_flush_desc. Currently it
can match on port/bridge ifindex, vlan id and fdb flags. It is used to
describe the existing dynamic fdb flush operation. Note that this flush
operation doesn't treat permanent entries in a special way (fdb_delete vs
fdb_delete_local), it will delete them regardless if any port is using
them, so currently it can't directly replace deletes which need to handle
that case, although we can extend it later for that too.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c
net/bridge/br_netlink.c
net/bridge/br_private.h
net/bridge/br_sysfs_br.c