Add a minimal ndo_fdb_del_bulk implementation which flushes all entries.
Support for more fine-grained filtering will be added in the following
patches.
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
        .ndo_fix_features        = br_fix_features,
        .ndo_fdb_add             = br_fdb_add,
        .ndo_fdb_del             = br_fdb_delete,
+       .ndo_fdb_del_bulk        = br_fdb_delete_bulk,
        .ndo_fdb_dump            = br_fdb_dump,
        .ndo_fdb_get             = br_fdb_get,
        .ndo_bridge_getlink      = br_getlink,
 
        spin_unlock_bh(&br->hash_lock);
 }
 
+int br_fdb_delete_bulk(struct ndmsg *ndm, struct nlattr *tb[],
+                      struct net_device *dev, u16 vid,
+                      struct netlink_ext_ack *extack)
+{
+       struct net_bridge_port *p = NULL;
+       struct net_bridge *br;
+
+       if (netif_is_bridge_master(dev)) {
+               br = netdev_priv(dev);
+       } else {
+               p = br_port_get_rtnl(dev);
+               if (!p) {
+                       NL_SET_ERR_MSG_MOD(extack, "Device is not a bridge port");
+                       return -EINVAL;
+               }
+               br = p->br;
+       }
+
+       br_fdb_flush(br);
+
+       return 0;
+}
+
 /* Flush all entries referring to a specific port.
  * if do_all is set also flush static entries
  * if vid is set delete all entries that match the vlan_id
 
 
 int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
                  struct net_device *dev, const unsigned char *addr, u16 vid);
+int br_fdb_delete_bulk(struct ndmsg *ndm, struct nlattr *tb[],
+                      struct net_device *dev, u16 vid,
+                      struct netlink_ext_ack *extack);
 int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[], struct net_device *dev,
               const unsigned char *addr, u16 vid, u16 nlh_flags,
               struct netlink_ext_ack *extack);