[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170427090404.GY2649@secunet.com>
Date: Thu, 27 Apr 2017 11:04:04 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Ansis Atteka <ansisatteka@...il.com>
CC: Ansis Atteka <aatteka@....org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case
before encrypting packets
On Fri, Apr 21, 2017 at 02:45:17PM -0700, Ansis Atteka wrote:
>
> I removed Geneve tunneling from equation and tried to run a simple
> iperf underlay UDP test while IPsec was still enabled to observe
> issues with the udp4_ufo_fragment() case.
>
> Unfortunately, as can be seen from kernel tracer output below, I was
> unable to come up with a test case where udp4_ufo_fragment function
> would ever be invoked while IPsec is enabled:
>
> admin1@...ntu1:~/xfrm_test/net$ ifconfig em2.4001 | grep "inet addr"
> inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
> admin1@...ntu1:~/xfrm_test/net$ ethtool -k em2.4001 | grep
> udp-fragmentation-offload
> udp-fragmentation-offload: on
> admin1@...ntu1:~/xfrm_test/net$ sudo trace-cmd record -p
> function_graph -c -F iperf -c 192.168.1.2 -u -l20000
> admin1@...ntu1:~/xfrm_test/net$ trace-cmd report | grep udp4
> admin1@...ntu1:~/xfrm_test/net$
>
>
> Nevertheless, after disabling IPsec and leaving everything else the
> same, I start to see that udp4_ufo_fragment() gets invoked:
>
> admin1@...ntu1:~/xfrm_test/net$ trace-cmd report | grep udp4
> iperf-25466 [004] 242431.203307: funcgraph_entry:
> 0.113 us | udp4_hwcsum();
> iperf-25466 [004] 242431.203360: funcgraph_entry:
> |
> udp4_ufo_fragment() {
> iperf-25466 [004] 242431.508436: funcgraph_entry:
> 0.080 us | udp4_hwcsum();
> iperf-25466 [004] 242431.508542: funcgraph_entry:
> |
> udp4_ufo_fragment() {
>
>
> However, non-IPsec case really does not have this ESP packet
> corruption problem, because then the packets are in plain and can
> utilize checksum offloads. Do we really have a problem there for
> IPsec?
Probably not, at least locally generated packets don't do
ufo if they have an IPsec route. So it seems to be ok to
leave udp4_ufo_fragment as it is.
Powered by blists - more mailing lists