Message ID | 20230117085544.591523-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 s9csp1643677wrn; Tue, 17 Jan 2023 01:00:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXsMAu5PyX8RRahadnXd1j58wQR1wbGO7KAGs6hHDAghAIJ04KfWXXe5aU6xOVEbOLbkERog X-Received: by 2002:a05:6a20:9597:b0:af:7762:3c29 with SMTP id iu23-20020a056a20959700b000af77623c29mr2044598pzb.10.1673946052218; Tue, 17 Jan 2023 01:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673946052; cv=none; d=google.com; s=arc-20160816; b=nf8GaE9M3RtM4yN5+XOy64+qg7J82ZmXKm7qeI8rRRR4SI34YN6SU4Dq52IP3AiFe4 5QZqfbVXw4Ut6DAz8JOampYa9iNFcv83Ik6MsPsGV/D6GLZbdkNPxCdlniyOz2e1Sf9T nxeU2EMpO3J/eeAF8K3XveocUKbJLyTOI9nZe21dwQXabB2eVMxKpUhUidzKE0n9qys/ HKWrcli3tHRhyxr/Ga0OqtMJDGlRZ8CeLIsjNyQzdVIqWgRQbwZVobN+EZ07kLrEbKvU cY3/2FgO80FFs6wjzlL9gP/JmiM3g5NQ3cR8jj1jRzjJn1vXTdGxp9eNQhVXCt7R8lLK SVHA== 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=aXa4jzVOSlSgZDNkI6KRD14SA9UbLun/8d+Gt8V15Tg=; b=mWdpNINKdhbhcBLvk6DuUDbld1UF2ZYS0iytfFT/ZXC4gVgvARYPGsSAvOovlQJbGT NrrgUy1RvzvGBr6WHsYkR0OMWatlCKd2u3Wufql9JUaqxa2c3Famitpe9y7BNCIFwob/ Mk1dRTFmk47D1XYEcvgUESVFF2Q5cNa4KtEkLp9rixZwdA+wMM67vMdQ/RofKnsja/L8 Dbl+AF8rVPYeWhNdskugLJjVWcHrcuIbfSsQIG+oix0Hw9djbaj7eFk2vI77GNeqdC6S Q5nRI7RhtiIwZpt7ld7L4sBqZe8qSLEnBG0OOxYxiSieYkwR1zftGIFa7ZPSazCQTm4M ck2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=BLbubivx; 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 o23-20020a63fb17000000b0046f75b665b8si27877227pgh.757.2023.01.17.01.00.40; Tue, 17 Jan 2023 01:00:52 -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=BLbubivx; 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 S236201AbjAQI4C (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Tue, 17 Jan 2023 03:56:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235785AbjAQIz7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 17 Jan 2023 03:55:59 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93D154C2C; Tue, 17 Jan 2023 00:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1673945754; x=1705481754; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WROUCb8ntrKety6kZXKtQ1SdfnKnooXCndT+0soShOg=; b=BLbubivxSeU5T2OtQL7Wgw+PjQVHnGmU0rfR7/utflobYgWaDTlTYjhR fj5m697pjzY0868ADBKrQOYV7EjhUPmNj9ax1SIQX5MBXpn0qdsZgMh6y WHpnr6tdZsTvRM8FDCrHsXBFKfsKM+/Ew70Utdz1aVsBqddhPy67UWjXL ydQRY56UMzOk9mAIYT7xkbilqhRi3tRpYLhIbjhxZTOt0hrbTd1CwuBeY Lk1PFTusAlT6a4AyHlWOfUrjjNgoTHMehbLz/k+hEt1SC6skszk7NiDj8 z9j+XraWqsBYnDmMIhlNbYJm5Hwfm/DI9mYalObljdIwU3Pl4IDswyG2/ g==; X-IronPort-AV: E=Sophos;i="5.97,222,1669100400"; d="scan'208";a="196960283" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Jan 2023 01:55:51 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 17 Jan 2023 01:55:51 -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, 17 Jan 2023 01:55:47 -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 0/5] Improve locking in the VCAP API Date: Tue, 17 Jan 2023 09:55:39 +0100 Message-ID: <20230117085544.591523-1-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.39.0 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?1755259655640631391?= X-GMAIL-MSGID: =?utf-8?q?1755259655640631391?= |
Series |
Improve locking in the VCAP API
|
|
Message
Steen Hegelund
Jan. 17, 2023, 8:55 a.m. UTC
This improves the VCAP cache and the VCAP rule list protection against access from different sources. The VCAP Admin lock protects the list of rules for the VCAP instance as well as the cache used for encoding and decoding rules. This series provides dedicated functions for accessing rule statistics, decoding rule content, verifying if a rule exists and getting a rule with the lock held, as well as ensuring the use of the lock when the list of rules or the cache is accessed. Steen Hegelund (5): net: microchip: sparx5: Add support for rule count by cookie net: microchip: sparx5: Add support to check for existing VCAP rule id net: microchip: sparx5: Add VCAP admin locking in debugFS net: microchip: sparx5: Improve VCAP admin locking in the VCAP API net: microchip: sparx5: Add lock initialization to the KUNIT tests .../microchip/sparx5/sparx5_tc_flower.c | 34 +-- .../net/ethernet/microchip/vcap/vcap_api.c | 234 ++++++++++++------ .../ethernet/microchip/vcap/vcap_api_client.h | 2 + .../microchip/vcap/vcap_api_debugfs.c | 14 +- .../microchip/vcap/vcap_api_debugfs_kunit.c | 1 + .../ethernet/microchip/vcap/vcap_api_kunit.c | 1 + .../microchip/vcap/vcap_api_private.h | 3 + 7 files changed, 175 insertions(+), 114 deletions(-)
Comments
Hello: This series was applied to netdev/net-next.git (master) by David S. Miller <davem@davemloft.net>: On Tue, 17 Jan 2023 09:55:39 +0100 you wrote: > This improves the VCAP cache and the VCAP rule list protection against > access from different sources. > > The VCAP Admin lock protects the list of rules for the VCAP instance as > well as the cache used for encoding and decoding rules. > > This series provides dedicated functions for accessing rule statistics, > decoding rule content, verifying if a rule exists and getting a rule with > the lock held, as well as ensuring the use of the lock when the list of > rules or the cache is accessed. > > [...] Here is the summary with links: - [net-next,1/5] net: microchip: sparx5: Add support for rule count by cookie https://git.kernel.org/netdev/net-next/c/27d293cceee5 - [net-next,2/5] net: microchip: sparx5: Add support to check for existing VCAP rule id https://git.kernel.org/netdev/net-next/c/975d86acaec7 - [net-next,3/5] net: microchip: sparx5: Add VCAP admin locking in debugFS https://git.kernel.org/netdev/net-next/c/9579e2c271b4 - [net-next,4/5] net: microchip: sparx5: Improve VCAP admin locking in the VCAP API https://git.kernel.org/netdev/net-next/c/1972b6d927ac - [net-next,5/5] net: microchip: sparx5: Add lock initialization to the KUNIT tests https://git.kernel.org/netdev/net-next/c/595655e08174 You are awesome, thank you!