On Fri, Feb 20, 2015 at 10:50 AM, Jesse Gross <je...@nicira.com> wrote: > Upstream commit: > udp-tunnel: Add a few more UDP tunnel APIs > > Added a few more UDP tunnel APIs that can be shared by UDP based > tunnel protocol implementation. The main ones are highlighted below. > > setup_udp_tunnel_sock() configures UDP listener socket for > receiving UDP encapsulated packets. > > udp_tunnel_xmit_skb() and upd_tunnel6_xmit_skb() transmit skb > using UDP encapsulation. > > udp_tunnel_sock_release() closes the UDP tunnel listener socket. > > Signed-off-by: Andy Zhou <az...@nicira.com> > Signed-off-by: David S. Miller <da...@davemloft.net> > > Upstream: 6a93cc90 ("udp-tunnel: Add a few more UDP tunnel APIs") > Signed-off-by: Jesse Gross <je...@nicira.com> > --- > datapath/linux/compat/include/linux/skbuff.h | 5 ++ > datapath/linux/compat/include/net/udp_tunnel.h | 67 +++++++++++++++++++++- > datapath/linux/compat/udp_tunnel.c | 77 > +++++++++++++++++++++++++- > 3 files changed, 144 insertions(+), 5 deletions(-) > > diff --git a/datapath/linux/compat/include/linux/skbuff.h > b/datapath/linux/compat/include/linux/skbuff.h > index 20a575c..78d84cc 100644 > --- a/datapath/linux/compat/include/linux/skbuff.h > +++ b/datapath/linux/compat/include/linux/skbuff.h > @@ -10,8 +10,13 @@ > #define SKB_GSO_GRE 0 > #endif > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) > +#define SKB_GSO_UDP_TUNNEL 0 > +#endif > + > #if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0) > #define SKB_GSO_GRE_CSUM 0 > +#define SKB_GSO_UDP_TUNNEL_CSUM 0 > #endif > > #ifndef HAVE_IGNORE_DF_RENAME > diff --git a/datapath/linux/compat/include/net/udp_tunnel.h > b/datapath/linux/compat/include/net/udp_tunnel.h > index f25023f..16b150c 100644 > --- a/datapath/linux/compat/include/net/udp_tunnel.h > +++ b/datapath/linux/compat/include/net/udp_tunnel.h > @@ -4,10 +4,25 @@ > #include <linux/version.h> > #include <linux/kconfig.h> > > -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) > #include_next <net/udp_tunnel.h> > + > +static inline struct sk_buff * > +rpl_udp_tunnel_handle_offloads(struct sk_buff *skb, bool udp_csum) > +{ This is not in sync with compat version.
> + if (skb_is_gso(skb) && skb_is_encapsulated(skb)) { .... > +static inline struct sk_buff *udp_tunnel_handle_offloads(struct sk_buff *skb, > + bool udp_csum, > + bool is_vxlan) > +{ > + int type = udp_csum ? SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL; otherwise looks good. Acked-by: Pravin B Shelar <pshe...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev