From patchwork Fri Nov 13 16:05:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 11904023 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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 77E4AC388F7 for ; Fri, 13 Nov 2020 16:06:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BB4922201 for ; Fri, 13 Nov 2020 16:06:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbgKMQGc (ORCPT ); Fri, 13 Nov 2020 11:06:32 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:46573 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726503AbgKMQGb (ORCPT ); Fri, 13 Nov 2020 11:06:31 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B7E2B5C018D; Fri, 13 Nov 2020 11:06:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 13 Nov 2020 11:06:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=5EyIgtsm3MUPjZ2XN AEt5cMRG1yLnaZN5s+MoQv0JlE=; b=md4ll/K50YNZSj2jrWNMEv/5f3GjpCF1+ 5irgQTLM7cMw22aoTRG9ZGSWnwqG8uqAQcaT48Su7g9OTa4ouZPRMZ1jcmEW6Kgj j5DEK/9j70ZF9nSDGfPssWO0Ja36aZQZC2DG/q6ufiHYGqEmPVS3mdN3+reoymwP Aq4G4b63KMISaSvXKu5IYkUbY8BDmIHKHN8O6o1iDfQS520fYtKL167CiVhLgeBN 4hovuhe5q9lGQsvPUFH9+KXaQtx0nDY9dQkgI2ZmU1C+nlTmSm0jaMsfVEzSOkY0 PIZBiHrvypV0Z1xxG4pO/eSmRqj0NBDqa7fdNRlExB2kQCp4MaxfA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvhedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepkeekgfetgeeuvddtgeffieetgfeuieeiud ethfdthfekteetlefgveelteeuieegnecuffhomhgrihhnpehgihhthhhusgdrtghomhen ucfkphepkeegrddvvdelrdduheegrddugeejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: from shredder.lan (igld-84-229-154-147.inter.net.il [84.229.154.147]) by mail.messagingengine.com (Postfix) with ESMTPA id 71B093280059; Fri, 13 Nov 2020 11:06:28 -0500 (EST) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, jiri@nvidia.com, dsahern@gmail.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH net-next 00/15] mlxsw: Preparations for nexthop objects support - part 1/2 Date: Fri, 13 Nov 2020 18:05:44 +0200 Message-Id: <20201113160559.22148-1-idosch@idosch.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel This patch set contains small and non-functional changes aimed at making it easier to support nexthop objects in mlxsw. Follow up patches can be found here [1]. Patches #1-#4 add a type field to the nexthop group struct instead of the existing protocol field. This will be used later on to add a nexthop object type, which can contain both IPv4 and IPv6 nexthops. Patches #5-#7 move the IPv4 FIB info pointer (i.e., 'struct fib_info') from the nexthop group struct to the route. The pointer will not be available when the nexthop group is a nexthop object, but it needs to be accessible to routes regardless. Patch #8 is the biggest change, but it is an entirely cosmetic change and should therefore be easy to review. The motivation and the change itself are explained in detail in the commit message. Patches #9-#12 perform small changes so that two functions that are currently split between IPv4 and IPv6 could be consolidated in patches #13 and #14. The functions will be reused for nexthop objects. Patch #15 removes an outdated comment. [1] https://github.com/idosch/linux/tree/submit/nexthop_objects Ido Schimmel (15): mlxsw: spectrum_router: Compare key with correct object type mlxsw: spectrum_router: Add nexthop group type field mlxsw: spectrum_router: Use nexthop group type in hash table key mlxsw: spectrum_router: Associate neighbour table with nexthop instead of group mlxsw: spectrum_router: Store FIB info in route mlxsw: spectrum_router: Remove unused field 'prio' from IPv4 FIB entry struct mlxsw: spectrum_router: Move IPv4 FIB info into a union in nexthop group struct mlxsw: spectrum_router: Split nexthop group configuration to a different struct mlxsw: spectrum_ipip: Remove overlay protocol from can_offload() callback mlxsw: spectrum_router: Pass nexthop netdev to mlxsw_sp_nexthop6_type_init() mlxsw: spectrum_router: Pass nexthop netdev to mlxsw_sp_nexthop4_type_init() mlxsw: spectrum_router: Remove unused argument from mlxsw_sp_nexthop6_type_init() mlxsw: spectrum_router: Consolidate mlxsw_sp_nexthop{4, 6}_type_init() mlxsw: spectrum_router: Consolidate mlxsw_sp_nexthop{4, 6}_type_fini() mlxsw: spectrum_router: Remove outdated comment .../ethernet/mellanox/mlxsw/spectrum_ipip.c | 3 +- .../ethernet/mellanox/mlxsw/spectrum_ipip.h | 3 +- .../ethernet/mellanox/mlxsw/spectrum_router.c | 580 +++++++++--------- 3 files changed, 300 insertions(+), 286 deletions(-)