Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-27 Thread Steffen Klassert
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

Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-21 Thread Ansis Atteka
On 20 April 2017 at 02:47, Steffen Klassert wrote: > On Tue, Apr 18, 2017 at 07:10:03PM -0700, Ansis Atteka wrote: >> >> However, after taking pointers from your patch I came up with this one >> that may solve this problem once and for all (note, that I was seeing >> this bug only with ixgbe NIC t

Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-20 Thread Steffen Klassert
On Tue, Apr 18, 2017 at 07:10:03PM -0700, Ansis Atteka wrote: > > However, after taking pointers from your patch I came up with this one > that may solve this problem once and for all (note, that I was seeing > this bug only with ixgbe NIC that supports tx csum offloads). I hope > it does not brea

Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-18 Thread Ansis Atteka
On 18 April 2017 at 02:09, Steffen Klassert wrote: > On Thu, Apr 13, 2017 at 07:45:08PM -0700, Ansis Atteka wrote: >> On 11 April 2017 at 00:07, Steffen Klassert >> wrote: >> > >> > What's wrong with the checksum provided by the GSO layer and >> > why we have to do this unconditionally here? >> >

Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-18 Thread Steffen Klassert
On Thu, Apr 13, 2017 at 07:45:08PM -0700, Ansis Atteka wrote: > On 11 April 2017 at 00:07, Steffen Klassert > wrote: > > > > What's wrong with the checksum provided by the GSO layer and > > why we have to do this unconditionally here? > > > > I believe with "GSO layer" you meant the skb_gso_segme

Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-13 Thread Ansis Atteka
On 13 April 2017 at 19:45, Ansis Atteka wrote: > > > > On 11 April 2017 at 00:07, Steffen Klassert > wrote: >> >> On Mon, Apr 10, 2017 at 11:42:07AM -0700, Ansis Atteka wrote: >> > Otherwise, if L4 checksum calculation is done after encryption, >> > then all ESP packets end up being corrupted at

Re: [PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-11 Thread Steffen Klassert
On Mon, Apr 10, 2017 at 11:42:07AM -0700, Ansis Atteka wrote: > Otherwise, if L4 checksum calculation is done after encryption, > then all ESP packets end up being corrupted at the location > where pre-encryption L4 checksum field resides. > > One of the ways to reproduce this bug is to have a VM

[PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-10 Thread Ansis Atteka
Otherwise, if L4 checksum calculation is done after encryption, then all ESP packets end up being corrupted at the location where pre-encryption L4 checksum field resides. One of the ways to reproduce this bug is to have a VM with virtio_net driver (UFO set to ON in the guest VM); and then encapsu