summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-10-17 08:53:26 +0000
committerDavid S. Miller <davem@davemloft.net>2018-10-17 17:45:08 -0700
commit0efe11733356273d734cc2c5ab2dc6f5865cbeb6 (patch)
tree345d52c20bc6b6b8af54ef067838d0749aff4d88 /include/net
parent1941f1d6453a527ae8df59891da0319646608444 (diff)
downloadlinux-0efe11733356273d734cc2c5ab2dc6f5865cbeb6.tar.bz2
vxlan: Support marking RDSTs as offloaded
Offloaded bridge FDB entries are marked with NTF_OFFLOADED. Implement a similar mechanism for VXLAN, where a given remote destination can be marked as offloaded. To that end, introduce a new event, SWITCHDEV_VXLAN_FDB_OFFLOADED, through which the marking is communicated to the vxlan driver. To identify which RDST should be marked as offloaded, an switchdev_notifier_vxlan_fdb_info is passed to the listeners. The "offloaded" flag in that object determines whether the offloaded mark should be set or cleared. When sending offloaded FDB entries over netlink, mark them with NTF_OFFLOADED. 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')
-rw-r--r--include/net/switchdev.h1
-rw-r--r--include/net/vxlan.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 47199a11c586..b040f82351ba 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -148,6 +148,7 @@ enum switchdev_notifier_type {
SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE,
SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE,
+ SWITCHDEV_VXLAN_FDB_OFFLOADED,
};
struct switchdev_notifier_info {
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 1828d686ac4f..03431c148e16 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -192,6 +192,7 @@ union vxlan_addr {
struct vxlan_rdst {
union vxlan_addr remote_ip;
__be16 remote_port;
+ u8 offloaded:1;
__be32 remote_vni;
u32 remote_ifindex;
struct list_head list;
@@ -418,6 +419,7 @@ struct switchdev_notifier_vxlan_fdb_info {
u32 remote_ifindex;
u8 eth_addr[ETH_ALEN];
__be32 vni;
+ bool offloaded;
};
#if IS_ENABLED(CONFIG_VXLAN)