OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be32])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be64])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_find_nested])
+ OVS_GREP_IFELSE([$KSRC/include/net/vxlan.h], [vxlan_xmit_skb])
OVS_GREP_IFELSE([$KSRC/include/net/sctp/checksum.h], [sctp_compute_cksum])
#endif /* !HAVE_GRE_CISCO_REGISTER */
-#ifndef GRE_USE_KERNEL_GRE_HANDLE_OFFLOADS
+#ifndef USE_KERNEL_TUNNEL_API
/* GRE TX side. */
static void gre_csum_fix(struct sk_buff *skb)
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */
#endif /* HAVE_GRE_CISCO_REGISTER */
-#ifndef GRE_USE_KERNEL_GRE_HANDLE_OFFLOADS
+#ifndef USE_KERNEL_TUNNEL_API
#define gre_build_header rpl_gre_build_header
void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
#include <linux/version.h>
#if defined(HAVE_GRE_HANDLE_OFFLOADS) && \
- LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+ LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) && \
+ defined(HAVE_VXLAN_XMIT_SKB)
/* RHEL6 and RHEL7 both has backported tunnel API but RHEL6 has
* older version, so avoid using RHEL6 backports.
*/
-#define GRE_USE_KERNEL_GRE_HANDLE_OFFLOADS
+#define USE_KERNEL_TUNNEL_API
#endif
-#ifdef GRE_USE_KERNEL_GRE_HANDLE_OFFLOADS
+#ifdef USE_KERNEL_TUNNEL_API
#include_next <net/ip_tunnels.h>
static inline int rpl_iptunnel_xmit(struct rtable *rt,
struct sk_buff *skb, __be32 src,
#include <net/gre.h>
#include <linux/version.h>
-#ifdef GRE_USE_KERNEL_GRE_HANDLE_OFFLOADS
+#ifdef USE_KERNEL_TUNNEL_API
#include_next <net/vxlan.h>
static inline int rpl_vxlan_xmit_skb(struct vxlan_sock *vs,
#include "compat.h"
#include "gso.h"
-#ifndef GRE_USE_KERNEL_GRE_HANDLE_OFFLOADS
+#ifndef USE_KERNEL_TUNNEL_API
int iptunnel_xmit(struct rtable *rt,
struct sk_buff *skb,
__be32 src, __be32 dst, __u8 proto,
#include "datapath.h"
#include "gso.h"
#include "vlan.h"
-#ifndef GRE_USE_KERNEL_GRE_HANDLE_OFFLOADS
+#ifndef USE_KERNEL_TUNNEL_API
#define VXLAN_HLEN (sizeof(struct udphdr) + sizeof(struct vxlanhdr))