When Geneve was originally backported, it wasn't available as part
of a released kernel version but it is now, so we can take advantage
of the native implementation.
Note that Geneve was actually first available as part of the 3.18
kernel release but some drivers erroreously try to offload it as
if it were VXLAN, which was fixed in the 4.0 release. Since our
UDP tunnel compat layer already takes care of this, we continue
using the OVS Geneve implementation until 4.0.
Reported-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>
call_rcu(&gs->rcu, rcu_free_gs);
}
EXPORT_SYMBOL_GPL(rpl_geneve_sock_release);
+
+#endif /* kernel < 4.0 */
#ifndef __NET_GENEVE_WRAPPER_H
#define __NET_GENEVE_WRAPPER_H 1
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
+#include_next <net/geneve.h>
+#else
+
#ifdef CONFIG_INET
#include <net/udp_tunnel.h>
#endif
bool csum, bool xnet);
#endif /*ifdef CONFIG_INET */
+#endif /* kernel < 4.0 */
+
#endif /*ifdef__NET_GENEVE_WRAPPER_H */