From patchwork Wed Aug 16 09:57:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antony Antony X-Patchwork-Id: 13354821 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D6DFFBF1 for ; Wed, 16 Aug 2023 09:57:12 +0000 (UTC) Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 050B210F for ; Wed, 16 Aug 2023 02:57:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 028D620764; Wed, 16 Aug 2023 11:57:09 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ejMLfn_qWZSq; Wed, 16 Aug 2023 11:57:08 +0200 (CEST) Received: from mailout1.secunet.com (mailout1.secunet.com [62.96.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 6406F20520; Wed, 16 Aug 2023 11:57:08 +0200 (CEST) Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) by mailout1.secunet.com (Postfix) with ESMTP id 5E34D80004A; Wed, 16 Aug 2023 11:57:08 +0200 (CEST) Received: from mbx-essen-02.secunet.de (10.53.40.198) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 16 Aug 2023 11:57:08 +0200 Received: from moon.secunet.de (172.18.149.1) by mbx-essen-02.secunet.de (10.53.40.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 16 Aug 2023 11:57:07 +0200 Date: Wed, 16 Aug 2023 11:57:01 +0200 From: Antony Antony To: Steffen Klassert , Herbert Xu CC: Eyal Birger , Antony Antony via Devel , Subject: [PATCH v4 ipsec-next 0/3] xfrm: Support GRO decapsulation for ESP in UDP encapsulation Message-ID: Reply-To: References: <6dfd03c5fa0afb99f255f4a35772df19e33880db.1674156645.git.antony.antony@secunet.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6dfd03c5fa0afb99f255f4a35772df19e33880db.1674156645.git.antony.antony@secunet.com> Precedence: first-class Priority: normal Organization: secunet X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-02.secunet.de (10.53.40.198) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Hello, Here I re-worked this patch set and here is v4. v1->v2 fixed error path added skb_push use is_fou instead of holding sk in skb. user configurable option to enable GRO; using UDP_GRO v2->v3 only support GRO for UDP_ENCAP_ESPINUDP and not UDP_ENCAP_ESPINUDP_NON_IKE. The _NON_IKE is an IETF early draft version and not widly used. v3->v4 removed refactoring since refactored function is only used once removed refcount on sk, sk is not used any more. fixed encap_type as Eyal recommended. removed un-necessary else since there is a goto before that. We are not merging v4 and v6 functions at this moment. As it would need more work to do it cleanly. Steffen Klassert (3): xfrm: Use the XFRM_GRO to indicate a GRO call on input. xfrm: Support GRO for IPv4 ESP in UDP encapsulation. xfrm: Support GRO for IPv6 ESP in UDP encapsulation. include/net/gro.h | 2 +- include/net/ipv6_stubs.h | 3 ++ include/net/xfrm.h | 4 ++ net/ipv4/esp4_offload.c | 6 ++- net/ipv4/udp.c | 18 +++++++- net/ipv4/xfrm4_input.c | 98 ++++++++++++++++++++++++++++++++-------- net/ipv6/af_inet6.c | 1 + net/ipv6/esp6_offload.c | 10 +++- net/ipv6/xfrm6_input.c | 98 ++++++++++++++++++++++++++++++++-------- net/xfrm/xfrm_input.c | 6 +-- 10 files changed, 197 insertions(+), 49 deletions(-) --- 2.30.2 -antony