mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 06:52:07 +00:00
bridge: switchdev: Allow clearing FDB entry offload indication
Currently, an FDB entry only ceases being offloaded when it is deleted. This changes with VxLAN encapsulation. Devices capable of performing VxLAN encapsulation usually have only one FDB table, unlike the software data path which has two - one in the bridge driver and another in the VxLAN driver. Therefore, bridge FDB entries pointing to a VxLAN device are only offloaded if there is a corresponding entry in the VxLAN FDB. Allow clearing the offload indication in case the corresponding entry was deleted from the VxLAN FDB. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
045a5a9914
commit
e9ba0fbc7d
8 changed files with 20 additions and 13 deletions
|
@ -103,7 +103,7 @@ int br_switchdev_set_port_flag(struct net_bridge_port *p,
|
|||
static void
|
||||
br_switchdev_fdb_call_notifiers(bool adding, const unsigned char *mac,
|
||||
u16 vid, struct net_device *dev,
|
||||
bool added_by_user)
|
||||
bool added_by_user, bool offloaded)
|
||||
{
|
||||
struct switchdev_notifier_fdb_info info;
|
||||
unsigned long notifier_type;
|
||||
|
@ -111,6 +111,7 @@ br_switchdev_fdb_call_notifiers(bool adding, const unsigned char *mac,
|
|||
info.addr = mac;
|
||||
info.vid = vid;
|
||||
info.added_by_user = added_by_user;
|
||||
info.offloaded = offloaded;
|
||||
notifier_type = adding ? SWITCHDEV_FDB_ADD_TO_DEVICE : SWITCHDEV_FDB_DEL_TO_DEVICE;
|
||||
call_switchdev_notifiers(notifier_type, dev, &info.info);
|
||||
}
|
||||
|
@ -126,13 +127,15 @@ br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
|
|||
br_switchdev_fdb_call_notifiers(false, fdb->key.addr.addr,
|
||||
fdb->key.vlan_id,
|
||||
fdb->dst->dev,
|
||||
fdb->added_by_user);
|
||||
fdb->added_by_user,
|
||||
fdb->offloaded);
|
||||
break;
|
||||
case RTM_NEWNEIGH:
|
||||
br_switchdev_fdb_call_notifiers(true, fdb->key.addr.addr,
|
||||
fdb->key.vlan_id,
|
||||
fdb->dst->dev,
|
||||
fdb->added_by_user);
|
||||
fdb->added_by_user,
|
||||
fdb->offloaded);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue