Hi,

can anybody give any idea on this please?

+ ovs-discuss

Regards,
Vladislav Odintsov

> On 7 Apr 2022, at 19:54, Vladislav Odintsov <[email protected]> wrote:
> 
> Hi,
> 
> I’ve faced an issue where GENEVE and VXLAN offload on RX path doesn’t work 
> with openvswitch OOT kernel module.
> The problem reproduced at least on CentOS 7.5, 7.8 (but I think more recent 
> versions are affected too).
> Initially the problem was observed with OVS 2.13, but it reproduces with 2.17 
> and master branches as well.
> 
> The problem is shown with tcpdump while iperf3 on top of VXLAN of GENEVE is 
> run (RX traffic; length 1448):
> 
>    19:19:00.223575 IP 10.1.0.105.60228 > 10.1.0.106.6081: Geneve, Flags 
> [none], vni 0x0: IP 1.1.1.5.targus-getdata1 > 1.1.1.6.44652: Flags [.], seq 
> 40722105:40723553, ack 38, win 64, options [nop,nop,TS val 2491722176 ecr 
> 151867193], length 1448
> 
> The correct RX handling for GENEVE and VXLAN was broken in v2.10.0 release 
> with [1] commit (if I understand correctly).
> With OVS kmod v2.9.x GRO for VXLAN and GENEVE packets works as expected.
> In CentOS 7.x in kernel-devel packages there is no include/net/erspan.h 
> header file, therefore USE_UPSTREAM_TUNNEL macro is unset.
> So I’ve tried to apply next patch:
> 
> diff --git a/acinclude.m4 b/acinclude.m4
> index 914e27b93..cde232966 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -671,9 +671,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
>                         [OVS_GREP_IFELSE([$KSRC/include/net/ip_tunnels.h],
>                                          [iptunnel_pull_offloads],
>                         [OVS_GREP_IFELSE([$KSRC/include/net/dst_cache.h], 
> [dst_cache],
> -                        [OVS_GREP_IFELSE([$KSRC/include/net/erspan.h], 
> [erspan_md2],
> -                                         
> [OVS_DEFINE([USE_UPSTREAM_TUNNEL])])])])])
> +                                         
> [OVS_DEFINE([USE_UPSTREAM_TUNNEL])])])])
> 
> +  OVS_GREP_IFELSE([$KSRC/include/net/erspan.h], [erspan_md2],
> +                  [OVS_DEFINE([USE_BUILTIN_ERSPAN_MD2])])
>   OVS_GREP_IFELSE([$KSRC/include/net/dst_cache.h], [dst_cache],
>                   [OVS_DEFINE([USE_BUILTIN_DST_CACHE])])
>   OVS_GREP_IFELSE([$KSRC/include/net/mpls.h], [mpls_hdr],
> diff --git a/datapath/linux/compat/include/net/erspan.h 
> b/datapath/linux/compat/include/net/erspan.h
> index 4a6a8f240..a36ce727b 100644
> --- a/datapath/linux/compat/include/net/erspan.h
> +++ b/datapath/linux/compat/include/net/erspan.h
> @@ -1,4 +1,4 @@
> -#ifndef USE_UPSTREAM_TUNNEL
> +#ifndef USE_BUILTIN_ERSPAN_MD2
> #ifndef __LINUX_ERSPAN_H
> #define __LINUX_ERSPAN_H
> 
> After the next patch the problem was resolved (length 65k):
> 
>    19:05:13.500646 IP 10.1.0.105.51432 > 10.1.0.106.6081: Geneve, Flags 
> [none], vni 0x0: IP 1.1.1.5.targus-getdata1 > 1.1.1.6.54874: Flags [.], seq 
> 185753153:185818313, ack 38, win 64, options [nop,nop,TS val 2490895458 ecr 
> 151040475], length 65160
> 
> The problem is that with this change erspan functionality in OVS is broken 
> and I couldn’t understand where to see the root cause for this:
> 
> # ovs-vsctl add-port test at_erspan0 -- set int at_erspan0 type=erspan 
> options:key=1 options:remote_ip=10.1.0.101 options:erspan_ver=1 
> options:erspan_idx=1
> ovs-vsctl: Error detected while setting up 'at_erspan0': could not add 
> network device at_erspan0 to ofproto (Address family not supported by 
> protocol).  See ovs-vswitchd log for details.
> ovs-vsctl: The default log directory is "/var/log/openvswitch".
> 
> In ovs logs:
> 2022-04-07T16:17:33.175Z|00051|dpif|WARN|system@ovs-system: failed to add 
> at_erspan0 as port: Address family not supported by protocol
> 2022-04-07T16:17:33.175Z|00052|bridge|WARN|could not add network device 
> at_erspan0 to ofproto (Address family not supported by protocol)
> 
> Can anybody help understand the best way to fix the initial (GRO for udp_tnl) 
> issue and not to break things around this? :)
> Thanks.
> 
> 1: 
> https://github.com/openvswitch/ovs/commit/e1ededf45f072c41295f1b441a6f106159ff191b
> 
> Regards,
> Vladislav Odintsov
> 
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to