On Fri, Feb 20, 2015 at 10:50 AM, Jesse Gross <[email protected]> wrote:
> There are two important GSO tunnel features that were introduced
> after the 3.12 cutoff for our current out of tree GSO implementation:
> * 3.16 introduced support for outer UDP checksums.
> * 3.18 introduced support for verifying hardware support for protocols
> other than VXLAN.
>
> In cases where these features are used, we should use OVS GSO to
> ensure correct behavior. However, we also want to continue to use
> kernel GSO or hardware TSO in existing situations. Therefore, this
> extends the range of kernels where OVS GSO is available to 3.18 and
> makes it easier to select which one to use.
>
> Signed-off-by: Jesse Gross <[email protected]>
> ---
> v2: Fix compilation on kernels 3.12 and 3.17.
> v3: Dramatically simplify kernel version checks by using backports
> for almost everything on pre-3.18 kernels and just using GSO
> where available.
> ---
> acinclude.m4 | 2 -
> datapath/linux/compat/gre.c | 11 ++--
> datapath/linux/compat/gso.c | 68 ++------------------
> datapath/linux/compat/gso.h | 85 +++++++++++++------------
> datapath/linux/compat/include/linux/skbuff.h | 8 +++
> datapath/linux/compat/include/net/gre.h | 2 +-
> datapath/linux/compat/include/net/ip_tunnels.h | 54 +++++++---------
> datapath/linux/compat/include/net/vxlan.h | 10 +--
> datapath/linux/compat/ip_tunnels_core.c | 86
> ++++++++++++++++++++++++--
> 9 files changed, 168 insertions(+), 158 deletions(-)
>
...
> diff --git a/datapath/linux/compat/include/net/gre.h
> b/datapath/linux/compat/include/net/gre.h
> index af1d991..08f6ee1 100644
> --- a/datapath/linux/compat/include/net/gre.h
> +++ b/datapath/linux/compat/include/net/gre.h
> @@ -81,7 +81,7 @@ static inline __be16 tnl_flags_to_gre_flags(__be16 tflags)
> #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */
> #endif /* HAVE_GRE_CISCO_REGISTER */
>
> -#ifndef USE_KERNEL_TUNNEL_API
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
>
> #define gre_build_header rpl_gre_build_header
> void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
> diff --git a/datapath/linux/compat/include/net/ip_tunnels.h
> b/datapath/linux/compat/include/net/ip_tunnels.h
> index 74c6a2c..017acf0 100644
> --- a/datapath/linux/compat/include/net/ip_tunnels.h
> +++ b/datapath/linux/compat/include/net/ip_tunnels.h
> @@ -2,34 +2,12 @@
> #define __NET_IP_TUNNELS_WRAPPER_H 1
>
> #include <linux/version.h>
> -#if defined(HAVE_GRE_HANDLE_OFFLOADS) && \
> - 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 USE_KERNEL_TUNNEL_API
> -#endif
>
> -#ifdef USE_KERNEL_TUNNEL_API
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
> #include_next <net/ip_tunnels.h>
> -
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
> -static inline int rpl_iptunnel_xmit(struct sock *sk, struct rtable *rt,
> - struct sk_buff *skb, __be32 src,
> - __be32 dst, __u8 proto, __u8 tos,
> - __u8 ttl, __be16 df, bool xnet)
> -{
> -#ifdef HAVE_IPTUNNEL_XMIT_NET
> - return iptunnel_xmit(NULL, rt, skb, src, dst, proto, tos, ttl, df);
> -#else
> - return iptunnel_xmit(rt, skb, src, dst, proto, tos, ttl, df, xnet);
> -#endif
> -}
> -#define iptunnel_xmit rpl_iptunnel_xmit
> #endif
>
I was hoping we can get rid of all these check and just use compat
iptunnel_xmit, but It is not required in this patch set, we can do it
later.
Acked-by: Pravin B Shelar <[email protected]>
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev