bridge: switchdev: Allow clearing FDB entry offload indication

[ Upstream commit e9ba0fbc7dd23a74e77960c98c988f59a1ff75aa ]

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>
Stable-dep-of: bee2ef946d31 ("net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Ido Schimmel
2018-10-17 08:53:29 +00:00
committed by Greg Kroah-Hartman
parent c5a0142c4d
commit 76c1d0d1cb
8 changed files with 20 additions and 13 deletions

View File

@@ -155,7 +155,8 @@ struct switchdev_notifier_fdb_info {
struct switchdev_notifier_info info; /* must be first */
const unsigned char *addr;
u16 vid;
bool added_by_user;
u8 added_by_user:1,
offloaded:1;
};
static inline struct net_device *