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=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 BC84AC10F14 for ; Tue, 16 Apr 2019 14:43:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9698620693 for ; Tue, 16 Apr 2019 14:43:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729561AbfDPOnz (ORCPT ); Tue, 16 Apr 2019 10:43:55 -0400 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:57620 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfDPOnx (ORCPT ); Tue, 16 Apr 2019 10:43:53 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.89) (envelope-from ) id 1hGPJP-0003KX-3o; Tue, 16 Apr 2019 16:43:51 +0200 From: Florian Westphal To: steffen.klassert@secunet.com Cc: Subject: [PATCH ipsec-next 0/3] xfrm: remove three xfrm_afinfo_policy indirections Date: Tue, 16 Apr 2019 16:44:36 +0200 Message-Id: <20190416144439.23854-1-fw@strlen.de> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series removes three indirections from xfrm_afinfo_policy by folding them into their callers. 1. Tos is a one-liner only needed by ipv4 2. init_path is also small and only needed by ipv6 3. decode_session has no dependencies on ipv6 or ipv4, fold it. The remaining indirections are necessary in the CONFIG_IPV6=m case. Its possible to fold only the ipv4 part and handle ipv6 based on CONFIG_IPV6_{MODULE,BUILTIN} but that increases complexity, so my intent is to go after indirections similar to the ones folded here first. Florian Westphal (3): xfrm: remove tos indirection from afinfo_policy xfrm: remove init_path indirection from afinfo_policy xfrm: remove decode_session indirection from afinfo_policy include/net/xfrm.h | 7 - net/ipv4/xfrm4_policy.c | 127 ---------------------- net/ipv6/xfrm6_policy.c | 126 ---------------------- net/xfrm/xfrm_policy.c | 266 +++++++++++++++++++++++++++++++++++++++++------- 4 files changed, 232 insertions(+), 294 deletions(-)