summaryrefslogtreecommitdiff
path: root/include/net/vxlan.h
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-10-17 11:53:24 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-18 03:45:08 +0300
commit1941f1d6453a527ae8df59891da0319646608444 (patch)
tree361cb5d0241993f62d67b84f9811be2000b73204 /include/net/vxlan.h
parent9a99735317866e821c75f957fc85c63d049d330c (diff)
downloadlinux-1941f1d6453a527ae8df59891da0319646608444.tar.xz
vxlan: Add vxlan_fdb_find_uc() for FDB querying
A switchdev-capable driver that is aware of VXLAN may need to query VXLAN FDB. In the particular case of mlxsw, this functionality is limited to querying UC FDBs. Those being easier to deal with than the general case of RDST chain traversal, introduce an interface to query specifically UC FDBs: vxlan_fdb_find_uc(). 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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 3f00877f5edf..1828d686ac4f 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -420,4 +420,16 @@ struct switchdev_notifier_vxlan_fdb_info {
__be32 vni;
};
+#if IS_ENABLED(CONFIG_VXLAN)
+int vxlan_fdb_find_uc(struct net_device *dev, const u8 *mac, __be32 vni,
+ struct switchdev_notifier_vxlan_fdb_info *fdb_info);
+#else
+static inline int
+vxlan_fdb_find_uc(struct net_device *dev, const u8 *mac, __be32 vni,
+ struct switchdev_notifier_vxlan_fdb_info *fdb_info)
+{
+ return -ENOENT;
+}
+#endif
+
#endif