net: bridge: Remove FDB deletion through switchdev object
At this point no driver supports FDB add/del through switchdev object but rather via notification chain, thus, it is removed. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2bedde1abb
commit
3a83c2a7a5
|
@ -169,29 +169,11 @@ static void fdb_del_hw_addr(struct net_bridge *br, const unsigned char *addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fdb_del_external_learn(struct net_bridge_fdb_entry *f)
|
|
||||||
{
|
|
||||||
struct switchdev_obj_port_fdb fdb = {
|
|
||||||
.obj = {
|
|
||||||
.orig_dev = f->dst->dev,
|
|
||||||
.id = SWITCHDEV_OBJ_ID_PORT_FDB,
|
|
||||||
.flags = SWITCHDEV_F_DEFER,
|
|
||||||
},
|
|
||||||
.vid = f->vlan_id,
|
|
||||||
};
|
|
||||||
|
|
||||||
ether_addr_copy(fdb.addr, f->addr.addr);
|
|
||||||
switchdev_port_obj_del(f->dst->dev, &fdb.obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f)
|
static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f)
|
||||||
{
|
{
|
||||||
if (f->is_static)
|
if (f->is_static)
|
||||||
fdb_del_hw_addr(br, f->addr.addr);
|
fdb_del_hw_addr(br, f->addr.addr);
|
||||||
|
|
||||||
if (f->added_by_external_learn)
|
|
||||||
fdb_del_external_learn(f);
|
|
||||||
|
|
||||||
hlist_del_init_rcu(&f->hlist);
|
hlist_del_init_rcu(&f->hlist);
|
||||||
fdb_notify(br, f, RTM_DELNEIGH);
|
fdb_notify(br, f, RTM_DELNEIGH);
|
||||||
call_rcu(&f->rcu, fdb_rcu_free);
|
call_rcu(&f->rcu, fdb_rcu_free);
|
||||||
|
|
Loading…
Reference in New Issue