summaryrefslogtreecommitdiff
path: root/include/net/vxlan.h
diff options
context:
space:
mode:
authorJoseph Gasparakis <joseph.gasparakis@intel.com>2013-10-24 10:27:10 +0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-10-29 13:39:13 +0400
commite6cd988c27bb5918630db67b3526c9e78e786818 (patch)
treed009eb6f79d4e756234ef4bfc513a507938b3c99 /include/net/vxlan.h
parentcdfb97bc010d9e9d994eb68f2cbac3a8ada26104 (diff)
downloadlinux-e6cd988c27bb5918630db67b3526c9e78e786818.tar.xz
vxlan: Have the NIC drivers do less work for offloads
This patch removes the burden from the NIC drivers to check if the vxlan driver is enabled in the kernel and also makes available the vxlan headrooms to them. Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r--include/net/vxlan.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 2d64d3cd4999..6b6d180fb91a 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -36,5 +36,16 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
__be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb);
+/* IP header + UDP + VXLAN + Ethernet header */
+#define VXLAN_HEADROOM (20 + 8 + 8 + 14)
+/* IPv6 header + UDP + VXLAN + Ethernet header */
+#define VXLAN6_HEADROOM (40 + 8 + 8 + 14)
+
+#if IS_ENABLED(CONFIG_VXLAN)
void vxlan_get_rx_port(struct net_device *netdev);
+#else
+static inline void vxlan_get_rx_port(struct net_device *netdev)
+{
+}
+#endif
#endif