From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752118AbdECIVh (ORCPT ); Wed, 3 May 2017 04:21:37 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:53906 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbdECIVc (ORCPT ); Wed, 3 May 2017 04:21:32 -0400 Date: Wed, 3 May 2017 10:21:29 +0200 From: Steffen Klassert To: Eric Dumazet CC: Don Bowman , Cong Wang , "linux-kernel@vger.kernel.org" , Herbert Xu , Linux Kernel Network Developers Subject: Re: ipsec doesn't route TCP with 4.11 kernel Message-ID: <20170503082129.GM2649@secunet.com> References: <20170427084238.GX2649@secunet.com> <20170428071337.GG2649@secunet.com> <1493398002.31837.12.camel@edumazet-glaptop3.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1493398002.31837.12.camel@edumazet-glaptop3.roam.corp.google.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.182.7.193] X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: BA486E60-09A7-46EE-8F90-6C214BEF016A Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 28, 2017 at 09:46:42AM -0700, Eric Dumazet wrote: > On Fri, 2017-04-28 at 09:13 +0200, Steffen Klassert wrote: > > encap type espinudp sport 4500 dport 4500 addr 0.0.0.0 > > > > Ok, this is espinudp. This information was important. > > > This is not a GRO issue as I thought, the TX side is already broken. > > > > Could you please try the patch below? > > > > Subject: [PATCH] esp4: Fix udpencap for local TCP packets. > > > > Locally generated TCP packets are usually cloned, so we > > do skb_cow_data() on this packets. After that we need to > > reload the pointer to the esp header. On udpencap this > > header has an offset to skb_transport_header, so take this > > offset into account. > > > It looks like locally generated TCP packets could avoid the > skb_cow_data(), if you were using skb_header_cloned() instead of > skb_cloned() ? Yes, should be possible in the codepath where we do crypto with separate src and dst buffers. Would require some rearrangements to make sure we don't do inplace crypto in this case. Thanks for the hint!