summaryrefslogtreecommitdiff
path: root/include/net/vxlan.h
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-12-07 19:55:06 +0000
committerDavid S. Miller <davem@davemloft.net>2018-12-07 12:59:08 -0800
commite5ff4b1952893fb75aa75067fce31c8567341ed7 (patch)
treea07859a0b365af97fb147a696fbc5c577f0f6041 /include/net/vxlan.h
parent4f89f5b5353cae2e056713e823819f24cad92bc3 (diff)
downloadlwn-e5ff4b1952893fb75aa75067fce31c8567341ed7.tar.gz
lwn-e5ff4b1952893fb75aa75067fce31c8567341ed7.zip
vxlan: Add vxlan_fdb_clear_offload()
When a driver unoffloads all FDB entries en bloc, it's inefficient to send the switchdev notification one by one. Add a helper that walks the FDB table, unsetting the offload flag on RDST with a given VNI. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r--include/net/vxlan.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index f49aa9afe598..236403eb5ba6 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -429,6 +429,7 @@ int vxlan_fdb_find_uc(struct net_device *dev, const u8 *mac, __be32 vni,
struct switchdev_notifier_vxlan_fdb_info *fdb_info);
int vxlan_fdb_replay(const struct net_device *dev, __be32 vni,
struct notifier_block *nb);
+void vxlan_fdb_clear_offload(const struct net_device *dev, __be32 vni);
#else
static inline int
@@ -443,6 +444,11 @@ static inline int vxlan_fdb_replay(const struct net_device *dev, __be32 vni,
{
return -EOPNOTSUPP;
}
+
+static inline void
+vxlan_fdb_clear_offload(const struct net_device *dev, __be32 vni)
+{
+}
#endif
#endif