Message ID | 20230214104049.1553059-1-steen.hegelund@microchip.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2892943wrn; Tue, 14 Feb 2023 02:44:27 -0800 (PST) X-Google-Smtp-Source: AK7set8KQl4NjI7T5qXUK3etcXOkRlXMk1TR/JlAr7CWfDsjdQELOf9m3ECT/s8veOk09/86M/XY X-Received: by 2002:a17:902:f201:b0:19a:a4f3:6d4c with SMTP id m1-20020a170902f20100b0019aa4f36d4cmr1628485plc.67.1676371467074; Tue, 14 Feb 2023 02:44:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676371467; cv=none; d=google.com; s=arc-20160816; b=ZP0QqFpVJeNR7kp54z3cRHEn06fFB4reJ/YNVzQqJbTcHekfSLrWJLYonNrELyIkrn aiGDfR+24Y/tWps2jracLQoJf6JubBUkstRR9IDj8hscNOf4dUPC79fefid0Id6Gena7 GzIH1ODLo/G6PnGRZHt79KhAbEnP1BBGZxCf87BGDOALZ1UDOvGJ9201Y5T/Z2wt2kCF 19VPoazOTVC5Jo+U6f6ZpfadFaNx7/3/iU5OAz2vG3iPgb6uVbDmafbMMGXVKs6MxpyP 6ARynE9MfEdI64utvzDKbP6G26tI9ArOc764gvsAi7IVwTNLcGhqpnJy52tMb22G32Xr XZKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gngJXc5kIIjZxahbuHzUWHm6Mma9Mrg59YbIIEpDiUQ=; b=OBCr5r9VPeEpWoTFZukcG4ydx6/q3sF578/6G7GEl4l9TEERoNb9Z9Ff7hreNR7RPO VIw+d5M59Wkldr6U81c6u4nL8vg63puK26GT7d3FuwQsalmC30xjk8krYM+UJDl3v/Om gqsAA7EXYvLMtQFD8F2JvP2rUmpzKja9A/5byKQSqMuenT2YNjDlFcC3u1zqnWT20Iqn 7ywVVjifVaXPBNn12n2UyGQDOJ9qKstJBO69SKrPVh4RhKlDPpHzDpo1fRFkrK/kT0mh mDNTzOZjBY6do2QcvbBLr3sAMmVSOx80yfiuSOKUo8sPomk/z62Z/yy04bjEaSYgSZVI aWdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=PNo8pOPY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a170902e5c700b0019912996c0bsi7679956plf.569.2023.02.14.02.44.14; Tue, 14 Feb 2023 02:44:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=PNo8pOPY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230492AbjBNKlb (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 14 Feb 2023 05:41:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbjBNKl3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Feb 2023 05:41:29 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAA2E25BBA; Tue, 14 Feb 2023 02:41:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1676371265; x=1707907265; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=aizzmjR+5szlZLAy1gCPHwfGmYNvddQbYfCKcNQoP+c=; b=PNo8pOPYiwHxK/lhWnf/A45FdQCy/5AVyqEJ4O682lKNFi/cy9TSzmMN wPADxBKEr7UvNPcu7NWyClMLecZ1VqwRBWp6pERp5wqxGFUU7u0T05aPS Z7DKfWej7nRhJpEU9KzyvkpVkCKmCV+GLWPUyWAG6OOwYPlS/Z0BLdDd2 wDSGUX2BkGnplOf5p+mY4+XtT76jo4IY75nsMfcN1+uKJTL5oJYToJ982 J36D5XPim8eiLjBgbIzwW13hVCG3lk/oGpncGOVQMrwe5h1gnEbldARk9 qhxxaWPkfVKX0zBip2fvjigGFtF41+qLydMioxP27DpQ8UOKYSxal2HmH w==; X-IronPort-AV: E=Sophos;i="5.97,296,1669100400"; d="scan'208";a="200588835" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Feb 2023 03:40:55 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 14 Feb 2023 03:40:55 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Tue, 14 Feb 2023 03:40:52 -0700 From: Steen Hegelund <steen.hegelund@microchip.com> To: "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> CC: Steen Hegelund <steen.hegelund@microchip.com>, <UNGLinuxDriver@microchip.com>, Randy Dunlap <rdunlap@infradead.org>, "Casper Andersson" <casper.casan@gmail.com>, Russell King <rmk+kernel@armlinux.org.uk>, Wan Jiabing <wanjiabing@vivo.com>, "Nathan Huckleberry" <nhuck@google.com>, <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, "Steen Hegelund" <Steen.Hegelund@microchip.com>, Daniel Machon <daniel.machon@microchip.com>, Horatiu Vultur <horatiu.vultur@microchip.com>, Lars Povlsen <lars.povlsen@microchip.com>, Dan Carpenter <error27@gmail.com>, Michael Walle <michael@walle.cc> Subject: [PATCH net-next v2 00/10] Adding Sparx5 ES0 VCAP support Date: Tue, 14 Feb 2023 11:40:39 +0100 Message-ID: <20230214104049.1553059-1-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757802887657001731?= X-GMAIL-MSGID: =?utf-8?q?1757802887657001731?= |
Series |
Adding Sparx5 ES0 VCAP support
|
|
Message
Steen Hegelund
Feb. 14, 2023, 10:40 a.m. UTC
This provides the Egress Stage 0 (ES0) VCAP (Versatile Content-Aware Processor) support for the Sparx5 platform. The ES0 VCAP is an Egress Access Control VCAP that uses frame keyfields and previously classified keyfields to add, rewrite or remove VLAN tags on the egress frames, and is therefore often referred to as the rewriter. The ES0 VCAP also supports trapping frames to the host. The ES0 VCAP has 1 lookup accessible with this chain id: - chain 10000000: ES0 Lookup 0 The ES0 VCAP does not do traffic classification to select a keyset, but it does have two keysets that can be used on all traffic. For now only the ISDX keyset is used. The ES0 VCAP can match on an ISDX key (Ingress Service Index) as one of the frame metadata keyfields, similar to the ES2 VCAP. The ES0 VCAP uses external counters in the XQS (statistics) group. Version History: ================ v2 Added corrections suggested by Dan Carpenter: - Added a "Fixes" tag on patch 2 - Using roundup/down macros provided by math.h - Check return value in sparx5_tc_action_vlan_modify() v1 Initial version Steen Hegelund (10): net: microchip: sparx5: Discard frames with SMAC multicast addresses net: microchip: sparx5: Clear rule counter even if lookup is disabled net: microchip: sparx5: Egress VLAN TPID configuration follows IFH net: microchip: sparx5: Use chain ids without offsets when enabling rules net: microchip: sparx5: Improve the error handling for linked rules net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model net: microchip: sparx5: Updated register interface with VCAP ES0 access net: microchip: sparx5: Add ES0 VCAP keyset configuration for Sparx5 net: microchip: sparx5: Add TC support for the ES0 VCAP net: microchip: sparx5: Add TC vlan action support for the ES0 VCAP .../ethernet/microchip/sparx5/sparx5_main.c | 1 + .../microchip/sparx5/sparx5_main_regs.h | 1829 ++++++++++++----- .../ethernet/microchip/sparx5/sparx5_port.c | 5 + .../net/ethernet/microchip/sparx5/sparx5_tc.h | 74 + .../microchip/sparx5/sparx5_tc_flower.c | 370 +++- .../microchip/sparx5/sparx5_vcap_ag_api.c | 385 +++- .../microchip/sparx5/sparx5_vcap_debugfs.c | 41 + .../microchip/sparx5/sparx5_vcap_impl.c | 274 +++ .../microchip/sparx5/sparx5_vcap_impl.h | 25 + .../ethernet/microchip/sparx5/sparx5_vlan.c | 4 +- .../net/ethernet/microchip/vcap/vcap_ag_api.h | 174 +- .../net/ethernet/microchip/vcap/vcap_api.c | 18 +- .../microchip/vcap/vcap_api_debugfs_kunit.c | 4 +- .../ethernet/microchip/vcap/vcap_api_kunit.c | 4 +- .../microchip/vcap/vcap_model_kunit.c | 270 ++- .../microchip/vcap/vcap_model_kunit.h | 10 +- drivers/net/ethernet/microchip/vcap/vcap_tc.c | 3 + drivers/net/ethernet/microchip/vcap/vcap_tc.h | 1 + 18 files changed, 2749 insertions(+), 743 deletions(-)
Comments
Hello: This series was applied to netdev/net-next.git (master) by Paolo Abeni <pabeni@redhat.com>: On Tue, 14 Feb 2023 11:40:39 +0100 you wrote: > This provides the Egress Stage 0 (ES0) VCAP (Versatile Content-Aware > Processor) support for the Sparx5 platform. > > The ES0 VCAP is an Egress Access Control VCAP that uses frame keyfields and > previously classified keyfields to add, rewrite or remove VLAN tags on the > egress frames, and is therefore often referred to as the rewriter. > > [...] Here is the summary with links: - [net-next,v2,01/10] net: microchip: sparx5: Discard frames with SMAC multicast addresses https://git.kernel.org/netdev/net-next/c/65b6625069a4 - [net-next,v2,02/10] net: microchip: sparx5: Clear rule counter even if lookup is disabled https://git.kernel.org/netdev/net-next/c/d7953da4f293 - [net-next,v2,03/10] net: microchip: sparx5: Egress VLAN TPID configuration follows IFH https://git.kernel.org/netdev/net-next/c/38f6408c6071 - [net-next,v2,04/10] net: microchip: sparx5: Use chain ids without offsets when enabling rules https://git.kernel.org/netdev/net-next/c/0518e914f34a - [net-next,v2,05/10] net: microchip: sparx5: Improve the error handling for linked rules https://git.kernel.org/netdev/net-next/c/b5b0c3645988 - [net-next,v2,06/10] net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model https://git.kernel.org/netdev/net-next/c/a5cc98adf3cb - [net-next,v2,07/10] net: microchip: sparx5: Updated register interface with VCAP ES0 access https://git.kernel.org/netdev/net-next/c/f2a77dd69f51 - [net-next,v2,08/10] net: microchip: sparx5: Add ES0 VCAP keyset configuration for Sparx5 https://git.kernel.org/netdev/net-next/c/3cbe7537a7f1 - [net-next,v2,09/10] net: microchip: sparx5: Add TC support for the ES0 VCAP https://git.kernel.org/netdev/net-next/c/52b28a93c45d - [net-next,v2,10/10] net: microchip: sparx5: Add TC vlan action support for the ES0 VCAP https://git.kernel.org/netdev/net-next/c/ebf44ded76e9 You are awesome, thank you!