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 47121457A1 for ; Mon, 12 Aug 2024 15:04:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DF3C40B95; Mon, 12 Aug 2024 15:04:28 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2045.outbound.protection.outlook.com [40.107.94.45]) by mails.dpdk.org (Postfix) with ESMTP id C8D76402C3 for ; Mon, 12 Aug 2024 15:04:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JjKir721qQW4eRGPwOj463jj2CYXaf8yfI2PYWulj2qJwVRtzJ1HoHz5+dEvVHja2y8GARvow/aWBqkG0QjDraekOSudmcGZGaSoX9WHsimp/dH3+JIp0FVrz2jloru3NpQFQU77OEin3D2uVUq8TRfzJSYK5y7y6JQrjDU8UxctW1bPpKqcNKs5IOxZcu1FpLfshvlWVLIafpMhHToeAgy00MMKMPGeZpfNRkKHIkxgU+zoLVR0uSWFmPtHSM1z8z0kzIaxoQQSdnIggy0OElnpNrz2SAaLUpa2qFBXK6iNmyUxAB3QqaO2k0MmEvKKN1QtiYKE7B0KKujGmXCvtA== 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=2Adn50oHNoHvRcNQJCkQwkCW3a4pVfUpjR1qJr8BfKA=; b=UIWsmZjpmE5vZRvD30FV7wnNn+daCIyspLInNrMp8TvfeYFz3Gen6qzAMv38hZkPtXO8fkNAKExLgURjCxgVNILCg1Mw8ml8jK+ruyjkat9iTPsHIwVyMMMbK3irQgOZ4XiDMGynwQtnI3R5T90pJdq8oDeu405swQ3LMDpJm/Ko33KqvSng9OaubqvyFcneGPFjLhxCGVt6MzlepXrTDYLIMeHqGyAgjSruUH6dhyCRPgqSnK7GYAJVQfKbgDikGc1A17lDkLfIKLVley0qcomu8ORs8hgbkiGCe5POEgvgdiDpnkKPtcwcODBFQCykWlz+Farz4RE+igEdTxV63w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=networkplumber.org 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=2Adn50oHNoHvRcNQJCkQwkCW3a4pVfUpjR1qJr8BfKA=; b=GnFn+utp2j46/naT7kEhXV+8NjxIEeC75efnXGT7EQ161UD9EmBmk7PX+KzZjl9NUzRrhuFj8knaNp59DMArQ6VEXLVDbiIFUi+rN51VFLWt0GHDkTbUe++2mGTyCPQKOniS00FZx25M/Eqc+CDFLGJyR55gJuU3yfdt4qtthsrteAkjT/290SxOsJHhV2/wRjX8xvHbeg00zZIkGbf5NuVQoQL7yLNiyI89trG1sWP24HzV9jRmFVrrPEpDNKJ/j+Hg4QQquIIz17GfhQ/BL9S7TDlaGkxDzrlDaZ4YbC7TQ5a162JdBd7qt5PqhAX0js6E+Ok+LjokryUTczz2gA== Received: from SN6PR04CA0095.namprd04.prod.outlook.com (2603:10b6:805:f2::36) by MN6PR12MB8491.namprd12.prod.outlook.com (2603:10b6:208:46f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20; Mon, 12 Aug 2024 13:04:21 +0000 Received: from SN1PEPF00026369.namprd02.prod.outlook.com (2603:10b6:805:f2:cafe::3a) by SN6PR04CA0095.outlook.office365.com (2603:10b6:805:f2::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22 via Frontend Transport; Mon, 12 Aug 2024 13:04:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SN1PEPF00026369.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Mon, 12 Aug 2024 13:04:21 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 12 Aug 2024 06:04:07 -0700 Received: from nvidia.com (10.126.230.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; Mon, 12 Aug 2024 06:04:05 -0700 From: Xueming Li To: Stephen Hemminger CC: , David Hunt , dpdk stable Subject: patch 'power: fix number of uncore frequencies' has been queued to stable release 23.11.2 Date: Mon, 12 Aug 2024 20:50:19 +0800 Message-ID: <20240812125035.389667-143-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240812125035.389667-1-xuemingl@nvidia.com> References: <20240712110153.309690-23-xuemingl@nvidia.com> <20240812125035.389667-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00026369:EE_|MN6PR12MB8491:EE_ X-MS-Office365-Filtering-Correlation-Id: 8617ae20-504b-4b87-0694-08dcbacf484a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?nFwGuYm4iGdVEBRlNsyX6uiMAZAZhxhujiir0xnF2W3PhuMK7S1q0M2CxWU5?= =?us-ascii?Q?hqP5KJCb0hP4gXsqcj9JSQmK+pJY/ejUuPjOnoD8Q+I+WVtsm19eh16pEmDe?= =?us-ascii?Q?ZcPSv0qvWyIqwFPuMAOTmu0DKzzslrJDaNus/CKiKo3yiaWXvt9eA/AaFDKR?= =?us-ascii?Q?ELF5lp5PGzcYIRv9KVdAyT4I1byKIUlTnuU0k5PRBbkl3n2hkcX14gw/mrbX?= =?us-ascii?Q?MR7KtVMrKWTdcdPxn4LDj1Mq4HajvL8bpMAMLRZZzOBFxmlt1HRnHrvt/fyd?= =?us-ascii?Q?MXjl6NtcDcnPdALpJ8uXDS3cl5kwPnOGIM/NWmaTQH86nWAIYbINPl5ZKvlw?= =?us-ascii?Q?AS8dOpZIFEjqJhiZYN8Gac0hPwCIjxKGWUdoicc1k1c9rOwvjs96a71xwIvT?= =?us-ascii?Q?Q8ZhoX4qkKMYxdaW1xkmE4QqPvNU9GqqwgWms6vl4yq89syJHeNyHA9Y1Duy?= =?us-ascii?Q?8R4u2iN/c3ihIXbgMVHfnwXKugY2s7261ERmMEdfhhaAX3kgNpeR6XX5svt3?= =?us-ascii?Q?2zYctbn8bxcwjdiLU4LRWZznvjCXNH2Uvr3g/Bx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yU2G1K1+Kzj010d1A63EYbtjUHeKzn?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2024 13:04:21.2012 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8617ae20-504b-4b87-0694-08dcbacf484a 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00026369.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8491 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/14/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=b53fb811c0cf187dcf54bd65f32af6deba0eb04b Thanks. Xueming Li --- >From b53fb811c0cf187dcf54bd65f32af6deba0eb04b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 22 Jul 2024 13:15:22 -0700 Subject: [PATCH] power: fix number of uncore frequencies Cc: Xueming Li [ upstream commit 93db1cfcc36ac1808c4a09ec50a470c6127b859e ] The number of uncore frequencies was defined in three places, and two of them were too small leading to test failures. All places should be using RTE_MAX_UNCORE_FREQS. Bugzilla ID: 1499 Fixes: 60b8a661a957 ("power: add Intel uncore frequency control") Signed-off-by: Stephen Hemminger Acked-by: David Hunt --- app/test/test_power_intel_uncore.c | 4 +--- lib/power/power_intel_uncore.c | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/test/test_power_intel_uncore.c b/app/test/test_power_intel_uncore.c index 80b45ce46e..049658627d 100644 --- a/app/test/test_power_intel_uncore.c +++ b/app/test/test_power_intel_uncore.c @@ -17,14 +17,12 @@ test_power_intel_uncore(void) #include #include -#define MAX_UNCORE_FREQS 32 - #define VALID_PKG 0 #define VALID_DIE 0 #define INVALID_PKG (rte_power_uncore_get_num_pkgs() + 1) #define INVALID_DIE (rte_power_uncore_get_num_dies(VALID_PKG) + 1) #define VALID_INDEX 1 -#define INVALID_INDEX (MAX_UNCORE_FREQS + 1) +#define INVALID_INDEX (RTE_MAX_UNCORE_FREQS + 1) static int check_power_uncore_init(void) { diff --git a/lib/power/power_intel_uncore.c b/lib/power/power_intel_uncore.c index 688aebc4ee..be174dce44 100644 --- a/lib/power/power_intel_uncore.c +++ b/lib/power/power_intel_uncore.c @@ -11,7 +11,6 @@ #include "power_intel_uncore.h" #include "power_common.h" -#define MAX_UNCORE_FREQS 32 #define MAX_NUMA_DIE 8 #define BUS_FREQ 100000 #define FILTER_LENGTH 18 @@ -32,7 +31,7 @@ struct uncore_power_info { unsigned int die; /* Core die id */ unsigned int pkg; /* Package id */ - uint32_t freqs[MAX_UNCORE_FREQS]; /* Frequency array */ + uint32_t freqs[RTE_MAX_UNCORE_FREQS]; /* Frequency array */ uint32_t nb_freqs; /* Number of available freqs */ FILE *f_cur_min; /* FD of scaling_min */ FILE *f_cur_max; /* FD of scaling_max */ @@ -51,7 +50,7 @@ set_uncore_freq_internal(struct uncore_power_info *ui, uint32_t idx) uint32_t target_uncore_freq, curr_max_freq; int ret; - if (idx >= MAX_UNCORE_FREQS || idx >= ui->nb_freqs) { + if (idx >= RTE_MAX_UNCORE_FREQS || idx >= ui->nb_freqs) { RTE_LOG(DEBUG, POWER, "Invalid uncore frequency index %u, which " "should be less than %u\n", idx, ui->nb_freqs); return -1; @@ -221,7 +220,7 @@ power_get_available_uncore_freqs(struct uncore_power_info *ui) uint32_t i, num_uncore_freqs = 0; num_uncore_freqs = (ui->init_max_freq - ui->init_min_freq) / BUS_FREQ + 1; - if (num_uncore_freqs >= MAX_UNCORE_FREQS) { + if (num_uncore_freqs >= RTE_MAX_UNCORE_FREQS) { RTE_LOG(ERR, POWER, "Too many available uncore frequencies: %d\n", num_uncore_freqs); goto out; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-12 20:44:07.009532642 +0800 +++ 0142-power-fix-number-of-uncore-frequencies.patch 2024-08-12 20:44:02.555069385 +0800 @@ -1 +1 @@ -From 93db1cfcc36ac1808c4a09ec50a470c6127b859e Mon Sep 17 00:00:00 2001 +From b53fb811c0cf187dcf54bd65f32af6deba0eb04b Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 93db1cfcc36ac1808c4a09ec50a470c6127b859e ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -42 +44 @@ -index 9c152e4ed2..4eb9c5900a 100644 +index 688aebc4ee..be174dce44 100644 @@ -54 +56 @@ - struct __rte_cache_aligned uncore_power_info { + struct uncore_power_info { @@ -68,2 +70,2 @@ - POWER_LOG(DEBUG, "Invalid uncore frequency index %u, which " - "should be less than %u", idx, ui->nb_freqs); + RTE_LOG(DEBUG, POWER, "Invalid uncore frequency index %u, which " + "should be less than %u\n", idx, ui->nb_freqs); @@ -77 +79 @@ - POWER_LOG(ERR, "Too many available uncore frequencies: %d", + RTE_LOG(ERR, POWER, "Too many available uncore frequencies: %d\n",