From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS 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 289A6C43381 for ; Wed, 27 Mar 2019 09:46:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E64A02075C for ; Wed, 27 Mar 2019 09:46:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="YN4rQ00q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731754AbfC0Jq5 (ORCPT ); Wed, 27 Mar 2019 05:46:57 -0400 Received: from mail-eopbgr10058.outbound.protection.outlook.com ([40.107.1.58]:36230 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726237AbfC0Jq5 (ORCPT ); Wed, 27 Mar 2019 05:46:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZZmr8R2GcZ6gtCUJn/iC2Gpt/wi3el3gDfbHillHqIw=; b=YN4rQ00qfhmHu64GUzlI7WhZneAiZG0yX1W9lwyLzV5BlsdnZZWVK0au9skEeIrGomTi8D9qe5qKsmFCn/CDbs0/S2JCWbGF1YCBDocAmZBhu5YYt7YSixQp1zwJ+N2RNgFDPSyqnK9jxPe395znTnxn78y6MzCHzYuaIpahI6Q= Received: from AM0PR05MB6100.eurprd05.prod.outlook.com (20.178.119.209) by AM0PR05MB6402.eurprd05.prod.outlook.com (20.179.33.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Wed, 27 Mar 2019 09:46:52 +0000 Received: from AM0PR05MB6100.eurprd05.prod.outlook.com ([fe80::85ee:723:721e:51f9]) by AM0PR05MB6100.eurprd05.prod.outlook.com ([fe80::85ee:723:721e:51f9%4]) with mapi id 15.20.1730.019; Wed, 27 Mar 2019 09:46:52 +0000 From: Ido Schimmel To: David Ahern CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , Jiri Pirko , Saeed Mahameed , David Ahern Subject: Re: [PATCH net-next 13/13] net: Use common nexthop init and release helpers Thread-Topic: [PATCH net-next 13/13] net: Use common nexthop init and release helpers Thread-Index: AQHU5E1bykPkkGJX50mAfEr3lJg7CqYfO2SA Date: Wed, 27 Mar 2019 09:46:52 +0000 Message-ID: <20190327094649.GA17428@splinter> References: <20190327032942.20473-1-dsahern@kernel.org> <20190327032942.20473-14-dsahern@kernel.org> In-Reply-To: <20190327032942.20473-14-dsahern@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5P189CA0030.EURP189.PROD.OUTLOOK.COM (2603:10a6:206:15::43) To AM0PR05MB6100.eurprd05.prod.outlook.com (2603:10a6:208:12e::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2c585a42-b138-4381-45ef-08d6b29923a3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR05MB6402; x-ms-traffictypediagnostic: AM0PR05MB6402: x-microsoft-antispam-prvs: x-forefront-prvs: 0989A7979C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(136003)(376002)(346002)(366004)(39860400002)(396003)(189003)(199004)(7736002)(6916009)(4744005)(81156014)(86362001)(8676002)(2906002)(6486002)(68736007)(229853002)(106356001)(1076003)(8936002)(33656002)(6116002)(4326008)(81166006)(97736004)(25786009)(3846002)(33716001)(305945005)(54906003)(6506007)(99286004)(316002)(386003)(71190400001)(26005)(76176011)(478600001)(6246003)(186003)(102836004)(105586002)(476003)(9686003)(14454004)(53936002)(6512007)(5660300002)(446003)(71200400001)(6436002)(11346002)(52116002)(256004)(66066001)(486006);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR05MB6402;H:AM0PR05MB6100.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 5pKPNVdEY3FEFpCI150e7NfcGzZuYk+p/A5AbuvlUTj2wNbvLisGyIb/khc/N30L46aObpKKa7ayGGK5XtpTIVMbiLLAleSZh9lNyjPMzP5PL4BU8twicePyzSGG3KSMdDcfAhRMVFgx+BCHaPo6xGGCgY5iQ6RyJZ2gdGtOcRmbagcBT/XzuedRm/di+PilVgbVUMWK6v6ODkeM5M9NHi88MWspMbyjilp86ZcUwwhjtClyHZQNeySpM9/W2Hf3yM9f9CoBeN8AqUJBDfQmhGN41JyaFzPaZmc8M8fxqLOS6Boh76oLSGMvDcpQj+ia046SN4Js8pWhTgNUqaVVe/ggTMZCwSTAXF41PmjosI4ORmJZhIGSEQcKADYKhMd1teWgCwq3/e+NZwtLlIH+TIqgl0rYWHBCdlSYvUHTa1w= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c585a42-b138-4381-45ef-08d6b29923a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2019 09:46:52.7754 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6402 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Mar 26, 2019 at 08:29:42PM -0700, David Ahern wrote: > From: David Ahern >=20 > With fib_nh_common in place, move common initialization and release > code into helpers used by both ipv4 and ipv6. For the moment, the init > is just the lwt encap and the release is both the net dev reference and s/net dev/netdev/ > the the lwt state reference. More will be added later. >=20 > Signed-off-by: David Ahern > --- > include/net/ip_fib.h | 4 ++++ > net/ipv4/fib_semantics.c | 60 +++++++++++++++++++++++++++++++-----------= ------ I don't really mind, but shouldn't the common parts be placed under net/core/ ? Like how the FIB rules have a common code in net/core/fib_rules.c ? > net/ipv6/route.c | 21 ++++------------- > 3 files changed, 48 insertions(+), 37 deletions(-)