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 8414145CE3 for ; Mon, 11 Nov 2024 07:41:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C92D40E15; Mon, 11 Nov 2024 07:41:26 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2084.outbound.protection.outlook.com [40.107.94.84]) by mails.dpdk.org (Postfix) with ESMTP id 6326740E15 for ; Mon, 11 Nov 2024 07:41:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gVzvMUvsI1AePzE3xgjED6rKfz3Irolgd7Pu+VwdCLdZfjF2EmNNw7lzPa9VjxVtUkjlAYiiKK6xNu+Qhuddgl2pH+Pz4uyYw6IPCN5qSrk+cz/Vw8/X8XIHdXc36Kp6ADt5Mm3D+iaiMhgrb7F9QBQsjRQahpr9ZnBg90lcc1sKrS+lvYunNzAZzvu+tQ0mERSkzatdd+UNYvFXVp17QLQkXd8/t318NnYXEsj46Z3QYMrlg0MJm0z89Mzafj4lr3paUfEDneRqY/WWAj/W1H9idO8ZNOLvP4nO/h7PZ69rpgNuKPFCA5Z6owWM5aQo/DTLZvyAqnov5Aa6JoYbuQ== 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=1IbcvxvaL8oLWszueTWOLt91OWrsLq19+76vk3leMlE=; b=qlgYPQQL3Zpm0UcQJgkHxNcZrlMf3LglyjoGS5pZoyHi5HyVWBUx4NjNsCqD9zj3SEPPWgiCV+RhdLiF1gbvekhb37sZo93I8gLbDymCIhOGDsBnUbHw2B780H4e/LNnENzFmEdNX6QplF+GzkLWZ3kSGDS00FoYcnIsK1xWhjun/pZomLlr8oEZGj1bPa79r5F4fH16i1TVgxV0yVNnu1brredUCRjRcn72BMSFwFEOpkZrLLNasWZD/PhMs03v/CWufKX6bkihiFLB5/uZptb0d08FUZltl/biXyOV1xicgG0tIOfx9SZt/MMnCEF0AqhQbN7vIESh2eersV3iHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=amd.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=1IbcvxvaL8oLWszueTWOLt91OWrsLq19+76vk3leMlE=; b=ugQ93rP2Gtku+UJ14YtPvunvz5hCxqfVbao0Oky2gTtujtj7zsruT+zm4M4HoVDaXnV2LITG0qYzXRcYn12kRDTnM390yRVXwNmC1pw6r+kwVhrl7MjHlWLD9oIwI6p/fuEwMnIHq7sHDXgtQZT71imlhjEDNPmMxfrFVBXq8SIAbNfRD7fDF/lYh02tWswektyrREvts0Z4qNvzzCrDSYx/FtNCZUYCdHIcIA13GZJ8w9SbpBnPD/e19gBjI3Iy7H6BNG5YdbPgnStOV1xPrjK9hl8KQBDieGRKC8Xbxbmedf7E7iq1uHFsQuE+wvyhub5sUK90kFrv0CyQEtXz+w== Received: from SN7PR18CA0030.namprd18.prod.outlook.com (2603:10b6:806:f3::7) by CY8PR12MB7218.namprd12.prod.outlook.com (2603:10b6:930:5a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:41:22 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:f3:cafe::72) by SN7PR18CA0030.outlook.office365.com (2603:10b6:806:f3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.27 via Frontend Transport; Mon, 11 Nov 2024 06:41:22 +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 SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) 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:41:22 +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; Sun, 10 Nov 2024 22:41:08 -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:41:05 -0800 From: Xueming Li To: Sivaprasad Tummala CC: , Konstantin Ananyev , Huisong Li , dpdk stable Subject: patch 'power: fix mapped lcore ID' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:28:45 +0800 Message-ID: <20241111062847.216344-120-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: SN1PEPF0002636A:EE_|CY8PR12MB7218:EE_ X-MS-Office365-Filtering-Correlation-Id: 55883273-cd80-4057-f2c0-08dd021bdb57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?LwcW9QkM5tA2FoTiFzrk7LIhUgqSBW1eragk6FsKW5mI0GmR+cKYngmndnAV?= =?us-ascii?Q?xP9j0YlHYSl03SUOpDBgVschVMMCoSrAhQUptoctjrbgZkfw17/QVOQ1geCl?= =?us-ascii?Q?/AhDdIJKOqTfeuVdUJCz5Vw1vMVy1wP9K0E9esfk0CDbgUdWG9tMxBgG05DI?= =?us-ascii?Q?eVmAbdddX3qY9aFdlrxcpY1R/SQda/n+ecUG7dQ60uGKLtpooGYZU0z+ezz/?= =?us-ascii?Q?MuFHDzYRyHViImGruzp3486CrYdIcFjee4LPzH54t712T2t417Y0SVE2LM2G?= =?us-ascii?Q?eNNkIcuBRu5zFN/DTo0x/SoAx9F9iQFQzc/tWgelH5wKay7FMwPWW/9zsmd8?= =?us-ascii?Q?AL2hqaNDjem4CB3EwEe2sTb/wsBp6cATIvvMJHaxid1Nz9fArJtRUHlxBgtM?= =?us-ascii?Q?+WLN7frKd6eL3PgsvbGEMZEsW+NZsDszgXsKUJmC3XOmTr/l7EvpIlTIwh8a?= =?us-ascii?Q?ONEKC7YyKbRE2l0GIzH/JJuIqRuGi8x+gtKepxkCSScrpQzO94WgUMOJXY5Z?= =?us-ascii?Q?Oh2AJ2e53SZb14vrfYYAmzY+N4ARklwceOr/cik9cFfps6nek5MmG3lHdkQU?= =?us-ascii?Q?B/jvzApPynfMC99fO50/DIJ+Y3F0HBWPUsxYz4gqtucvsE3uT6sfsitsk+6R?= =?us-ascii?Q?sZeU5DV7NZtgwc1DpAyquheiwm00u1vV7RvvNlscJQvKa+m+cuhPaK0d4LUk?= =?us-ascii?Q?TPXW7ccDgrSPeBNm5xttV9QQBuJKR+zd0CbU3b+nE+3W81mkRjLAPYrp5FZy?= =?us-ascii?Q?mChGjguGGDj6A6DPE9IPWr5irzneDLk9JyeE5vsjl32zswgpZMe1VZWcWInE?= =?us-ascii?Q?vUjozWd6nbqr0lAwJiqgg1kGhkgpiIItGkDCX76ugatecM6KXNnAEeJ14rVk?= =?us-ascii?Q?V5oKyheqbzZgNi5subpf5bXUWBWFUsQoVjsc7JU2VeC72lu0fkacHUxNehhs?= =?us-ascii?Q?BkfYhpemqFoIKnqxQRJFRRswIInMD5SND2xMcd4gW4jFkzlLe/lZVjIwM/tk?= =?us-ascii?Q?ZczJcsaaQZqE7RTo+oCHTd7saeRRcfc5ZiRkE+2rS56mdYMJjYnY89dzXneN?= =?us-ascii?Q?MfHga862Es7PVq9CyO1/1L2Ahim8ncwIqxTz3SHR1iHqcpSJ10dGiTAw7VN+?= =?us-ascii?Q?ZkoxDC85+cPnDn5z99lM53vGpUaoucaIISamIMLyIVoUP5DE82jOkISTzN07?= =?us-ascii?Q?kHBOC76K5OGIFtoxFYPnaCCIMlXLS9tQihR+jFGVgEgajmZUA+7B+e7h9IRJ?= =?us-ascii?Q?lpCs2ldukabCl2l8vB4V1BJ8yL32XdhmJKLyi02+sztSlGFBZBdE3QvBz1w+?= =?us-ascii?Q?f/MpTmdJdlWN2J4nwnjjmwlDlJNX7Hi5k8yk+GXLmQyt9CUw1tGihFdWToyV?= =?us-ascii?Q?zNxh8eLpmeu4G+UfqkV7BRpHPT3b5R445HEBkqPkdULfSJFbdQ=3D=3D?= 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)(36860700013)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:41:22.2418 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55883273-cd80-4057-f2c0-08dd021bdb57 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: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7218 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=ff3018e2ffc9660ddd9770657dbf491442a34c7a Thanks. Xueming Li --- >From ff3018e2ffc9660ddd9770657dbf491442a34c7a Mon Sep 17 00:00:00 2001 From: Sivaprasad Tummala Date: Fri, 18 Oct 2024 03:34:34 +0000 Subject: [PATCH] power: fix mapped lcore ID Cc: Xueming Li [ upstream commit 5c9b07eeba55d527025f1f4945e2dbb366f21215 ] This commit fixes an issue in the power library related to using lcores mapped to different physical cores (--lcores option in EAL). Previously, the power library incorrectly accessed CPU sysfs attributes for power management, treating lcore IDs as CPU IDs. e.g. with --lcores '1@128', lcore_id '1' was interpreted as CPU_id instead of '128'. This patch corrects the cpu_id based on lcore and CPU mappings. It also constraints power management support for lcores mapped to multiple physical cores/threads. When multiple lcores are mapped to the same physical core, invoking frequency scaling APIs on any lcore will apply the changes effectively. Fixes: 53e54bf81700 ("eal: new option --lcores for cpu assignment") Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Huisong Li --- app/test/test_power_cpufreq.c | 21 ++++++++++++++++++--- lib/power/power_acpi_cpufreq.c | 6 +++++- lib/power/power_amd_pstate_cpufreq.c | 6 +++++- lib/power/power_common.c | 22 ++++++++++++++++++++++ lib/power/power_common.h | 1 + lib/power/power_cppc_cpufreq.c | 6 +++++- lib/power/power_pstate_cpufreq.c | 6 +++++- 7 files changed, 61 insertions(+), 7 deletions(-) diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c index 619b2811c6..edbd34424e 100644 --- a/app/test/test_power_cpufreq.c +++ b/app/test/test_power_cpufreq.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "test.h" @@ -46,9 +47,10 @@ test_power_caps(void) static uint32_t total_freq_num; static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX]; +static uint32_t cpu_id; static int -check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo) +check_cur_freq(__rte_unused unsigned int lcore_id, uint32_t idx, bool turbo) { #define TEST_POWER_CONVERT_TO_DECIMAL 10 #define MAX_LOOP 100 @@ -62,13 +64,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo) int i; if (snprintf(fullpath, sizeof(fullpath), - TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) { + TEST_POWER_SYSFILE_CPUINFO_FREQ, cpu_id) < 0) { return 0; } f = fopen(fullpath, "r"); if (f == NULL) { if (snprintf(fullpath, sizeof(fullpath), - TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) { + TEST_POWER_SYSFILE_SCALING_FREQ, cpu_id) < 0) { return 0; } f = fopen(fullpath, "r"); @@ -497,6 +499,19 @@ test_power_cpufreq(void) { int ret = -1; enum power_management_env env; + rte_cpuset_t lcore_cpus; + + lcore_cpus = rte_lcore_cpuset(TEST_POWER_LCORE_ID); + if (CPU_COUNT(&lcore_cpus) != 1) { + printf("Power management doesn't support lcore %u mapping to %u CPUs\n", + TEST_POWER_LCORE_ID, + CPU_COUNT(&lcore_cpus)); + return TEST_SKIPPED; + } + for (cpu_id = 0; cpu_id < CPU_SETSIZE; cpu_id++) { + if (CPU_ISSET(cpu_id, &lcore_cpus)) + break; + } /* Test initialisation of a valid lcore */ ret = rte_power_init(TEST_POWER_LCORE_ID); diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c index 8b55f19247..d860a12a8c 100644 --- a/lib/power/power_acpi_cpufreq.c +++ b/lib/power/power_acpi_cpufreq.c @@ -258,7 +258,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id) return -1; } - pi->lcore_id = lcore_id; + if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) { + RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id); + return -1; + } + /* Check and set the governor */ if (power_set_governor_userspace(pi) < 0) { RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to " diff --git a/lib/power/power_amd_pstate_cpufreq.c b/lib/power/power_amd_pstate_cpufreq.c index dbd9d2b3ee..7b8e77003f 100644 --- a/lib/power/power_amd_pstate_cpufreq.c +++ b/lib/power/power_amd_pstate_cpufreq.c @@ -376,7 +376,11 @@ power_amd_pstate_cpufreq_init(unsigned int lcore_id) return -1; } - pi->lcore_id = lcore_id; + if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) { + RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id); + return -1; + } + /* Check and set the governor */ if (power_set_governor_userspace(pi) < 0) { RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to " diff --git a/lib/power/power_common.c b/lib/power/power_common.c index 1e09facb86..8ffb49ef8f 100644 --- a/lib/power/power_common.c +++ b/lib/power/power_common.c @@ -9,6 +9,7 @@ #include #include +#include #include "power_common.h" @@ -202,3 +203,24 @@ out: return ret; } + +int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id) +{ + rte_cpuset_t lcore_cpus; + uint32_t cpu; + + lcore_cpus = rte_lcore_cpuset(lcore_id); + if (CPU_COUNT(&lcore_cpus) != 1) { + RTE_LOG(ERR, POWER, "Power library does not support lcore %u mapping to %u CPUs", lcore_id, + CPU_COUNT(&lcore_cpus)); + return -1; + } + + for (cpu = 0; cpu < CPU_SETSIZE; cpu++) { + if (CPU_ISSET(cpu, &lcore_cpus)) + break; + } + *cpu_id = cpu; + + return 0; +} diff --git a/lib/power/power_common.h b/lib/power/power_common.h index c1c7139276..b928df941f 100644 --- a/lib/power/power_common.h +++ b/lib/power/power_common.h @@ -27,5 +27,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...) int read_core_sysfs_u32(FILE *f, uint32_t *val); int read_core_sysfs_s(FILE *f, char *buf, unsigned int len); int write_core_sysfs_s(FILE *f, const char *str); +int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id); #endif /* _POWER_COMMON_H_ */ diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c index f2ba684c83..add477c804 100644 --- a/lib/power/power_cppc_cpufreq.c +++ b/lib/power/power_cppc_cpufreq.c @@ -362,7 +362,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id) return -1; } - pi->lcore_id = lcore_id; + if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) { + RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id); + return -1; + } + /* Check and set the governor */ if (power_set_governor_userspace(pi) < 0) { RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to " diff --git a/lib/power/power_pstate_cpufreq.c b/lib/power/power_pstate_cpufreq.c index 5ca5f60bcd..890875bd93 100644 --- a/lib/power/power_pstate_cpufreq.c +++ b/lib/power/power_pstate_cpufreq.c @@ -564,7 +564,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id) return -1; } - pi->lcore_id = lcore_id; + if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) { + RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id); + return -1; + } + /* Check and set the governor */ if (power_set_governor_performance(pi) < 0) { RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to " -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:10.615056131 +0800 +++ 0119-power-fix-mapped-lcore-ID.patch 2024-11-11 14:23:05.362192835 +0800 @@ -1 +1 @@ -From 5c9b07eeba55d527025f1f4945e2dbb366f21215 Mon Sep 17 00:00:00 2001 +From ff3018e2ffc9660ddd9770657dbf491442a34c7a Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 5c9b07eeba55d527025f1f4945e2dbb366f21215 ] @@ -25 +27,0 @@ -Cc: stable@dpdk.org @@ -34 +36 @@ - lib/power/power_common.c | 23 +++++++++++++++++++++++ + lib/power/power_common.c | 22 ++++++++++++++++++++++ @@ -38 +40 @@ - 7 files changed, 62 insertions(+), 7 deletions(-) + 7 files changed, 61 insertions(+), 7 deletions(-) @@ -101 +103 @@ -index abad53bef1..ae809fbb60 100644 +index 8b55f19247..d860a12a8c 100644 @@ -104 +106 @@ -@@ -264,7 +264,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id) +@@ -258,7 +258,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id) @@ -110 +112 @@ -+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id); ++ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id); @@ -116 +118 @@ - POWER_LOG(ERR, "Cannot set governor of lcore %u to " + RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to " @@ -118 +120 @@ -index 4809d45a22..2b728eca18 100644 +index dbd9d2b3ee..7b8e77003f 100644 @@ -121 +123 @@ -@@ -382,7 +382,11 @@ power_amd_pstate_cpufreq_init(unsigned int lcore_id) +@@ -376,7 +376,11 @@ power_amd_pstate_cpufreq_init(unsigned int lcore_id) @@ -127 +129 @@ -+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id); ++ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id); @@ -133 +135 @@ - POWER_LOG(ERR, "Cannot set governor of lcore %u to " + RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to " @@ -135 +137 @@ -index 590986d5ef..b47c63a5f1 100644 +index 1e09facb86..8ffb49ef8f 100644 @@ -146 +148 @@ -@@ -204,3 +205,25 @@ out: +@@ -202,3 +203,24 @@ out: @@ -158,3 +160,2 @@ -+ POWER_LOG(ERR, -+ "Power library does not support lcore %u mapping to %u CPUs", -+ lcore_id, CPU_COUNT(&lcore_cpus)); ++ RTE_LOG(ERR, POWER, "Power library does not support lcore %u mapping to %u CPUs", lcore_id, ++ CPU_COUNT(&lcore_cpus)); @@ -173 +174 @@ -index 83f742f42a..82fb94d0c0 100644 +index c1c7139276..b928df941f 100644 @@ -176 +177 @@ -@@ -31,5 +31,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...) +@@ -27,5 +27,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...) @@ -184 +185 @@ -index e73f4520d0..cc9305bdfe 100644 +index f2ba684c83..add477c804 100644 @@ -187 +188 @@ -@@ -368,7 +368,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id) +@@ -362,7 +362,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id) @@ -193 +194 @@ -+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id); ++ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id); @@ -199 +200 @@ - POWER_LOG(ERR, "Cannot set governor of lcore %u to " + RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to " @@ -201 +202 @@ -index 1c2a91a178..4755909466 100644 +index 5ca5f60bcd..890875bd93 100644 @@ -204 +205 @@ -@@ -570,7 +570,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id) +@@ -564,7 +564,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id) @@ -210 +211 @@ -+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id); ++ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id); @@ -216 +217 @@ - POWER_LOG(ERR, "Cannot set governor of lcore %u to " + RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "