From patchwork Tue Nov 10 09:48:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 11893693 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=-6.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 54600C388F7 for ; Tue, 10 Nov 2020 09:50:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3377207D3 for ; Tue, 10 Nov 2020 09:50:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728478AbgKJJuT (ORCPT ); Tue, 10 Nov 2020 04:50:19 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:49741 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgKJJuS (ORCPT ); Tue, 10 Nov 2020 04:50:18 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 52B90367; Tue, 10 Nov 2020 04:50:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 10 Nov 2020 04:50:17 -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=Ms1fW1EcuYjinJ5+H NZ0w9Hb42fjkIFTjLLiVHw6IMY=; b=baJ/Vcr4E14DmU2IHKJIHUq43CblVW8Hw EB1JdKIxl5S1Jzx6PYJFX6vk84qmuQeWb/edwIeQAbDmi8ct99VKALxAjA1ShoSx L2s2dfewpFlaTP57ZAtboqZE010FZBKm9gGP4eG2xE+T9WH3A0qhafj+5ii1nzoq SB+UPWnXDLYbXhAEulNXf+jgnvkZjsq6cZSUxMzKf5/WR14y7zxVIpxpezfbLwWk N9BI9sH9nh2i11Zo0j0i/YxN0AHSHjn+S1pD1G5D3HhDlnHRdYfXiMkv21pzzGQk VYqXedcGEY/y+fc79xwV/AMwWn4ArPbHH0DlvLYB5VdImxnauk0lg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddujedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepteevgefhvefggfffkeeuffeuvdfhueehhe etffeikeegheevfedvgeelvdffudfhnecukfhppeekgedrvddvledrudehgedrudegjeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiughosh gthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: from shredder.mtl.com (igld-84-229-154-147.inter.net.il [84.229.154.147]) by mail.messagingengine.com (Postfix) with ESMTPA id 7CDEE3280060; Tue, 10 Nov 2020 04:50:15 -0500 (EST) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, jiri@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH net-next 00/15] mlxsw: spectrum: Prepare for XM implementation - prefix insertion and removal Date: Tue, 10 Nov 2020 11:48:45 +0200 Message-Id: <20201110094900.1920158-1-idosch@idosch.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel Jiri says: This is a preparation patchset for follow-up support of boards with extended mezzanine (XM), which is going to allow extended (scale-wise) router offload. XM requires a separate PRM register named XMDR to be used instead of RALUE to insert/update/remove FIB entries. Therefore, this patchset extends the previously introduces low-level ops to be able to have XM-specific FIB entry config implementation. Currently the existing original RALUE implementation is moved to "basic" low-level ops. Unlike legacy router, insertion/update/removal of FIB entries into XM could be done in bulks up to 4 items in a single PRM register write. That is why this patchset implements "an op context", that allows the future XM ops implementation to squash multiple FIB events to single register write. For that, the way in which the FIB events are processed by the work queue has to be changed. The conversion from 1:1 FIB event - work callback call to event queue is implemented in patch #3. Patch #4 introduces "an op context" that will allow in future to squash multiple FIB events into one XMDR register write. Patch #12 converts it from stack to be allocated per instance. Existing RALUE manipulations are pushed to ops in patch #10. Patch #13 is introducing a possibility for low-level implementation to have per FIB entry private memory. The rest of the patches are either cosmetics or smaller preparations. Jiri Pirko (15): mlxsw: spectrum_router: Pass non-register proto enum to __mlxsw_sp_router_set_abort_trap() mlxsw: spectrum_router: Use RALUE-independent op arg mlxsw: spectrum_router: Introduce FIB event queue instead of separate works mlxsw: spectrum: Propagate context from work handler containing RALUE payload mlxsw: spectrum_router: Push out RALUE pack into separate helper mlxsw: spectrum: Export RALUE pack helper and use it from IPIP mlxsw: spectrum_router: Pass destination IP as a pointer to mlxsw_reg_ralue_pack4() mlxsw: reg: Allow to pass NULL pointer to mlxsw_reg_ralue_pack4/6() mlxsw: spectrum_router: Use RALUE pack helper from abort function mlxsw: spectrum: Push RALUE packing and writing into low-level router ops mlxsw: spectrum_router: Prepare work context for possible bulking mlxsw: spectrum_router: Have FIB entry op context allocated for the instance mlxsw: spectrum_router: Introduce fib_entry priv for low-level ops mlxsw: spectrum_router: Track FIB entry committed state and skip uncommitted on delete mlxsw: spectrum_router: Introduce FIB entry update op drivers/net/ethernet/mellanox/mlxsw/reg.h | 8 +- .../ethernet/mellanox/mlxsw/spectrum_ipip.c | 34 +- .../ethernet/mellanox/mlxsw/spectrum_ipip.h | 7 +- .../ethernet/mellanox/mlxsw/spectrum_router.c | 761 +++++++++++++----- .../ethernet/mellanox/mlxsw/spectrum_router.h | 59 ++ 5 files changed, 635 insertions(+), 234 deletions(-)