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.8 required=3.0 tests=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 CD42EC433E0 for ; Sat, 16 May 2020 22:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AF30206D8 for ; Sat, 16 May 2020 22:43:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hTAYrkwQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbgEPWng (ORCPT ); Sat, 16 May 2020 18:43:36 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33007 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726660AbgEPWng (ORCPT ); Sat, 16 May 2020 18:43:36 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E5F875C006A; Sat, 16 May 2020 18:43:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 16 May 2020 18:43:34 -0400 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=fm2; bh=vbyX4uBlcuZmjkH89 pqAPRpwDxhKf3jZToin3GOfe00=; b=hTAYrkwQxpNdJZW1h4pPNmkcjxJzhZ0Ke qRzV1pWisiqI7+nsFRmaYSQSQBM4KsU8qfjF3UbOL36H5A/Woo3Tm8YzZMPcmzBy T/F8zM8LKq5zsYfEhSqxAURNDsVdTystAXc6OH8aeyBBrqE00VdOSRZQLa0TBjtV ruUpxNjW+B5ixjimEwiRNgVhOSQjBHtSiRAQwpTsija0GNNjgcR9h5XlKviY/tV7 nBduQ9MwWTmt7QiPrXHLzzYhgtmqaZbbQaP0ai9sbQSmLKFBEZ/5f5FbIxt6vUWJ 1LI0qTdujABPwJXLCMcRRFnYGnwDXXqcgv/A8ba8geD/DKj163oNA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddtuddguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepteevgefhvefggfffkeeuffeuvdfhueehhe etffeikeegheevfedvgeelvdffudfhnecukfhppeejledrudejiedrvdegrddutdejnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguohhstg hhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: from splinter.mtl.com (bzq-79-176-24-107.red.bezeqint.net [79.176.24.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 6EA8830663A0; Sat, 16 May 2020 18:43:33 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, jiri@mellanox.com, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH net-next 0/6] mlxsw: Reorganize trap data Date: Sun, 17 May 2020 01:43:04 +0300 Message-Id: <20200516224310.877237-1-idosch@idosch.org> X-Mailer: git-send-email 2.26.2 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 From: Ido Schimmel This patch set does not include any functional changes. It merely reworks the internal storage of traps, trap groups and trap policers in mlxsw to each use a single array. These changes allow us to get rid of the multiple arrays we currently have for traps, which make the trap data easier to validate and extend with more per-trap information in the future. It will also allow us to more easily add per-ASIC traps in future submissions. Last two patches include minor changes to devlink-trap selftests. Tested with existing devlink-trap selftests. Ido Schimmel (6): mlxsw: spectrum_trap: Move struct definition out of header file mlxsw: spectrum_trap: Store all trap policer data in one array mlxsw: spectrum_trap: Store all trap group data in one array mlxsw: spectrum_trap: Store all trap data in one array selftests: devlink_lib: Remove double blank line selftests: mlxsw: Do not hard code trap group name .../ethernet/mellanox/mlxsw/spectrum_trap.c | 763 ++++++++++++------ .../ethernet/mellanox/mlxsw/spectrum_trap.h | 16 +- .../net/mlxsw/devlink_trap_acl_drops.sh | 4 +- .../net/mlxsw/devlink_trap_l2_drops.sh | 33 +- .../net/mlxsw/devlink_trap_l3_drops.sh | 35 +- .../net/mlxsw/devlink_trap_l3_exceptions.sh | 20 +- .../net/mlxsw/devlink_trap_tunnel_ipip.sh | 6 +- .../net/mlxsw/devlink_trap_tunnel_vxlan.sh | 9 +- .../selftests/net/forwarding/devlink_lib.sh | 9 +- 9 files changed, 572 insertions(+), 323 deletions(-) -- 2.26.2