From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D0B145CE3 for ; Mon, 11 Nov 2024 07:36:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04CC640685; Mon, 11 Nov 2024 07:36:10 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2072.outbound.protection.outlook.com [40.107.96.72]) by mails.dpdk.org (Postfix) with ESMTP id BE77D40685 for ; Mon, 11 Nov 2024 07:36:08 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EmDwPChrSRhOWbg88lfLp+9HlyA/kL4AYlgC0cTGjiwNBT87qh/7+2oHCL077pTxIOUhuLW3Q9UQ3Shr9nEXY8zChHTexyC4n6jsgzOSdkCyotiC+iSSy8jeAJyw5qmw0UBoccKQKSIgsFGW7KVqOGqZoQDe5bxZqccUNLsawfA04DE30XexzjzkYUaVV5iIU3M442yJkHRCz5ZP8D5nGq7oQhOCziby8NVOPR9szBWYSf90/rBhmCS8kQYKHqB9MUw6OExDwKzdscQ9HriA1mmbweRLCw2n+FywQGbuIbkvnojgCyPQUGVR/z8PlaRmcXFs31brd1uS9dmUColCKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sZKnnNljzrEP1+jFmdpq66OvNkIUFlmiTWOabpvqgzE=; b=l92JnC9bJAldmiVr0Oe1ECruVXIyl6C1lZlouKchfljsTUYcrdZlVRjvHX+14JumZh4I4NjbLkFmtZfIAY5ZUHZcmyCPfmmOkTDoWumRLmIs+KjsbIirLlrx4wao5YoCUVGTM2GbDNCtQ9dOs9yhkaiEJ/7kai5YA9C2yVi/aP3pF2sm9vbHeY8KU9YvbIxL5b5FXoQ/t07X8KOl+YiUZ2sESRVOPHlerAeZmfYDfDmjD2Gz/12RxGdjzZNvUmcdsXVmWrcU7s/uRna8RZir47aCXdlTwVNtUwxzJJgD0CosxcMvuzNKq0fSbgzpKFDyu3eaoiwHglJabaxNDbl3Nw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sZKnnNljzrEP1+jFmdpq66OvNkIUFlmiTWOabpvqgzE=; b=lzQMzOkWDRoUWT4vRSEmJT6IlXvflcoHgD7yMoiFAMPnfuzjGojFAyUhMt6Er4I1sfLxN/u/32A0WeFzIj1SeQ1E+7OUNSrfARu3+Tfbw/xrHK+M3qYELLoAFNfL8FuD4lfwT0JQpwivN28i4Zx7hGnmSiBiqI0QQWO0FlbYCxNOURqllUUDBU2kQvclc0IHpgldMusWOtno/tA0PbDkdsSzzuiNOF70Cs6jxqJRapu8PfNHi7wZGndIkFy+l711fUpKN+Jqx4SaKdktr8lg+WCrLsU2O/KGI9TyglGgYKxHTXlk4N/mw53RR0J/W7TsCOxTSgOwNv2ggwavsKwS2w== Received: from BL1PR13CA0437.namprd13.prod.outlook.com (2603:10b6:208:2c3::22) by DM4PR12MB6159.namprd12.prod.outlook.com (2603:10b6:8:a8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26; Mon, 11 Nov 2024 06:36:04 +0000 Received: from BN2PEPF000044A5.namprd04.prod.outlook.com (2603:10b6:208:2c3:cafe::3b) by BL1PR13CA0437.outlook.office365.com (2603:10b6:208:2c3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:36:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000044A5.mail.protection.outlook.com (10.167.243.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:36:04 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:35:49 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:35:46 -0800 From: Xueming Li To: Radoslaw Tyl CC: , Anatoly Burakov , "Bruce Richardson" , dpdk stable Subject: patch 'net/i40e/base: fix repeated register dumps' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:51 +0800 Message-ID: <20241111062847.216344-66-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000044A5:EE_|DM4PR12MB6159:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b65f8c5-725e-490f-89ac-08dd021b1dbc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?j7rbkWrU1J4vQhKn1+ToVvGD4pQi+K87+YAnamGnA4Zs9Y4UP7vKjMzYsMjt?= =?us-ascii?Q?BSDVmf4JDLDO075/3wPTfwhFlEv9yTVbvcKRv7INU4yHgf6angECtqHyPALC?= =?us-ascii?Q?SLJIV4GXLv5/grWKdzugpIlRNJsmMH61BniE9yJFEEHwiaj36Ot9BbUAMDA5?= =?us-ascii?Q?wiJ/fJsn6uDrAvhCJY8YiLprlx974yoa8nxFib8rKnI4u25VXpMdFymIIlCz?= =?us-ascii?Q?FC8JFFrjngQG0pEOjdtkST3Po9qLHPHkv5BZv0ayM/A9kXCfL0QEOLh1n/2b?= =?us-ascii?Q?ZU/r475I4LiyoRBvcdScYaDS8Pn68Rscd/9z92RFiSrRkTv4WBBn0Rb1A/Xr?= =?us-ascii?Q?4E6T/hRA5ezEiQ7OwaFN7SBZ3ZmN1aaanMQqbfzxhNz/bAwvFoQGszrSFzRJ?= =?us-ascii?Q?iRa6OsXadB3h4xhRULppaJtACKOLqS9ZfAKKnqCNCaW7CrbDBYSXf6FZ/8Y2?= =?us-ascii?Q?WFYxvtk4SmX5o3O6O3KzlhwRlhWX8wqClyWQnS0jz/5KACNb8i/g1xAn0oaP?= =?us-ascii?Q?kWfcL+P78NYrQTfN5ZwfcSaJQzbEFTeT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:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:36:04.0558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b65f8c5-725e-490f-89ac-08dd021b1dbc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000044A5.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6159 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7c44c1b3f8b013f9e53710ddc05663dfe98a8f33 Thanks. Xueming Li --- >From 7c44c1b3f8b013f9e53710ddc05663dfe98a8f33 Mon Sep 17 00:00:00 2001 From: Radoslaw Tyl Date: Mon, 2 Sep 2024 10:54:33 +0100 Subject: [PATCH] net/i40e/base: fix repeated register dumps Cc: Xueming Li [ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ] Currently, when registers are dumped, the data inside them is changed, so repeated dumps lead to unexpected results. Fix this by making register list read-only. Fixes: 8db9e2a1b232 ("i40e: base driver") Signed-off-by: Radoslaw Tyl Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- drivers/net/i40e/base/i40e_diag.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c index b3c4cfd3aa..4ca102cdd5 100644 --- a/drivers/net/i40e/base/i40e_diag.c +++ b/drivers/net/i40e/base/i40e_diag.c @@ -55,7 +55,7 @@ static enum i40e_status_code i40e_diag_reg_pattern_test(struct i40e_hw *hw, return I40E_SUCCESS; } -static struct i40e_diag_reg_test_info i40e_reg_list[] = { +static const struct i40e_diag_reg_test_info i40e_reg_list[] = { /* offset mask elements stride */ {I40E_QTX_CTL(0), 0x0000FFBF, 1, I40E_QTX_CTL(1) - I40E_QTX_CTL(0)}, {I40E_PFINT_ITR0(0), 0x00000FFF, 3, I40E_PFINT_ITR0(1) - I40E_PFINT_ITR0(0)}, @@ -81,28 +81,28 @@ enum i40e_status_code i40e_diag_reg_test(struct i40e_hw *hw) { enum i40e_status_code ret_code = I40E_SUCCESS; u32 reg, mask; + u32 elements; u32 i, j; for (i = 0; i40e_reg_list[i].offset != 0 && ret_code == I40E_SUCCESS; i++) { + elements = i40e_reg_list[i].elements; /* set actual reg range for dynamically allocated resources */ if (i40e_reg_list[i].offset == I40E_QTX_CTL(0) && hw->func_caps.num_tx_qp != 0) - i40e_reg_list[i].elements = hw->func_caps.num_tx_qp; + elements = hw->func_caps.num_tx_qp; if ((i40e_reg_list[i].offset == I40E_PFINT_ITRN(0, 0) || i40e_reg_list[i].offset == I40E_PFINT_ITRN(1, 0) || i40e_reg_list[i].offset == I40E_PFINT_ITRN(2, 0) || i40e_reg_list[i].offset == I40E_QINT_TQCTL(0) || i40e_reg_list[i].offset == I40E_QINT_RQCTL(0)) && hw->func_caps.num_msix_vectors != 0) - i40e_reg_list[i].elements = - hw->func_caps.num_msix_vectors - 1; + elements = hw->func_caps.num_msix_vectors - 1; /* test register access */ mask = i40e_reg_list[i].mask; - for (j = 0; j < i40e_reg_list[i].elements && - ret_code == I40E_SUCCESS; j++) { + for (j = 0; j < elements && ret_code == I40E_SUCCESS; j++) { reg = i40e_reg_list[i].offset + (j * i40e_reg_list[i].stride); ret_code = i40e_diag_reg_pattern_test(hw, reg, mask); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:08.297586475 +0800 +++ 0065-net-i40e-base-fix-repeated-register-dumps.patch 2024-11-11 14:23:05.162192839 +0800 @@ -1 +1 @@ -From efc6a6b1facfa160e5e72f55893a301a6b27c628 Mon Sep 17 00:00:00 2001 +From 7c44c1b3f8b013f9e53710ddc05663dfe98a8f33 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org