From patchwork Thu Jun 10 12:06:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 12312971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 905FFC47094 for ; Thu, 10 Jun 2021 12:06:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 726EC610A5 for ; Thu, 10 Jun 2021 12:06:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbhFJMIm (ORCPT ); Thu, 10 Jun 2021 08:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230298AbhFJMIj (ORCPT ); Thu, 10 Jun 2021 08:08:39 -0400 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF4FCC061574 for ; Thu, 10 Jun 2021 05:06:42 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1lrJSI-0000Wo-OZ; Thu, 10 Jun 2021 14:06:38 +0200 From: Florian Westphal To: netdev@vger.kernel.org Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au, Florian Westphal Subject: [PATCH ipsec-next 0/5] xfrm: ipv6: remove hdr_off indirection Date: Thu, 10 Jun 2021 14:06:24 +0200 Message-Id: <20210610120629.23088-1-fw@strlen.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org IPV6 xfrm moves mutable extension headers to make space for the encapsulation header. For Mobile ipv6 sake this uses an indirect call (ipv6 can be built as module). These patches remove those indirections by placing a small parsing function in the xfrm core. While at it, the merged dstopt/rt hdroff function is realigned with ip6_find_1stfragopt (where they were copied from). ip6_find_1stfragopt received bug fixes that were missing from the cloned ones. Florian Westphal (5): xfrm: ipv6: add xfrm6_hdr_offset helper xfrm: ipv6: move mip6_destopt_offset into xfrm core xfrm: ipv6: move mip6_rthdr_offset into xfrm core xfrm: remove hdr_offset indirection xfrm: merge dstopt and routing hdroff functions include/net/xfrm.h | 3 -- net/ipv6/ah6.c | 1 - net/ipv6/esp6.c | 1 - net/ipv6/ipcomp6.c | 1 - net/ipv6/mip6.c | 97 ----------------------------------------- net/ipv6/xfrm6_output.c | 7 --- net/xfrm/xfrm_output.c | 78 ++++++++++++++++++++++++++++++++- 7 files changed, 76 insertions(+), 112 deletions(-)