On Thu, Jul 7, 2016 at 7:17 PM, pravin shelar <pshe...@ovn.org> wrote: > On Thu, Jul 7, 2016 at 7:16 PM, Jesse Gross <je...@kernel.org> wrote: >> On Thu, Jul 7, 2016 at 7:13 PM, Jesse Gross <je...@kernel.org> wrote: >>> On Thu, Jul 7, 2016 at 5:23 PM, Pravin B Shelar <pshe...@ovn.org> wrote: >>>> diff --git a/datapath/linux/compat/include/linux/udp.h >>>> b/datapath/linux/compat/include/linux/udp.h >>>> new file mode 100644 >>>> index 0000000..31ae022 >>>> --- /dev/null >>>> +++ b/datapath/linux/compat/include/linux/udp.h >>>> @@ -0,0 +1,33 @@ >>>> +#ifndef __LINUX_UDP_WRAPPER_H >>>> +#define __LINUX_UDP_WRAPPER_H 1 >>>> + >>>> +#include_next <linux/udp.h> >>>> +#include <linux/ipv6.h> >>>> + >>>> +#ifndef HAVE_NO_CHECK6_TX >>>> +static inline void udp_set_no_check6_tx(struct sock *sk, bool val) >>>> +{ >>>> +#ifdef HAVE_SK_NO_CHECK_TX >>>> + sk->sk_no_check_tx = val; >>>> +#else >>>> + /* since netwroking stack is not checking for zero UDP checksum >>>> + * check it in OVS module. */ >>>> + #define OVS_CHECK_UDP_TUNNEL_ZERO_CSUM >>>> +#endif >>>> +} >>>> + >>>> +static inline void udp_set_no_check6_rx(struct sock *sk, bool val) >>>> +{ >>>> +#ifdef HAVE_SK_NO_CHECK_TX >>>> + sk->sk_no_check_rx = val; >>>> +#endif >>>> +} >>>> +#endif >>> >>> I guess it probably makes more sense to #define >>> OVS_CHECK_UDP_TUNNEL_ZERO_CSUM in udp_set_no_check6_rx() since it is >>> receive side issue, though functionally it doesn't make a difference. >>> >>>> diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c >>>> index d45125d..3776990 100644 >>>> --- a/datapath/linux/compat/vxlan.c >>>> +++ b/datapath/linux/compat/vxlan.c >>>> @@ -850,6 +850,13 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct >>>> sk_buff *skb, >>>> oip6 = ipv6_hdr(skb); >>>> saddr.sin6.sin6_addr = oip6->saddr; >>>> saddr.sa.sa_family = AF_INET6; >>>> +#ifdef OVS_CHECK_UDP_TUNNEL_ZERO_CSUM >>>> + if (!udp_hdr(skb)->check && >>>> + !(vs->flags & VXLAN_F_UDP_ZERO_CSUM6_RX)) { >>>> + udp6_csum_zero_error(skb); >>>> + goto drop; >>>> + } >>>> +#endif >>>> #endif >>> >>> Do we need a version of this for Geneve as well? >> >> OK - I see that it actually came in later in the big resync patch. > > Yes, Geneve does not support ipv6 tunnels at this point.
In that case (with the minor adjustment noted above): Acked-by: Jesse Gross <je...@kernel.org> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev