diff options
author | Nikolay Aleksandrov <razor@blackwall.org> | 2022-04-13 12:51:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-13 13:46:26 +0200 |
commit | 1f78ee14eeac03952ec765cea7ce23cbf12d6894 (patch) | |
tree | 26205da8814352b7c6e00fc0b416e3661084782b /net/bridge/br_sysfs_br.c | |
parent | net: bridge: fdb: add ndo_fdb_del_bulk (diff) | |
download | linux-1f78ee14eeac03952ec765cea7ce23cbf12d6894.tar.xz linux-1f78ee14eeac03952ec765cea7ce23cbf12d6894.zip |
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>
Diffstat (limited to 'net/bridge/br_sysfs_br.c')
-rw-r--r-- | net/bridge/br_sysfs_br.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 3f7ca88c2aa3..612e367fff20 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c @@ -344,7 +344,11 @@ static DEVICE_ATTR_RW(group_addr); static int set_flush(struct net_bridge *br, unsigned long val, struct netlink_ext_ack *extack) { - br_fdb_flush(br); + struct net_bridge_fdb_flush_desc desc = { + .flags_mask = BR_FDB_STATIC + }; + + br_fdb_flush(br, &desc); return 0; } |