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 73F4545692; Tue, 23 Jul 2024 12:28:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0639A40EDD; Tue, 23 Jul 2024 12:28:08 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id 6A6B940151 for ; Tue, 23 Jul 2024 12:26:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721730395; x=1753266395; h=message-id:date:subject:to:cc:references:from: in-reply-to:mime-version; bh=cjh8qLl9b3u8MfGFJO5DKkC8iVYZWZQ0U/CCSQ5G1yU=; b=I1BBZdRxBJe9nI7kGMRBFj0ZxUH3TrSbrfC6HAD9TOpZwBP7wht052YZ WVsnrXNV0yuTGN5XCy7XWeeJ8U2pBvAriOYRy4/bm8qc7Zpo2/5TdMKd3 xSbrOTducOqHIS+D9V/ymEvAKtpByrPLYQIyO1/gGvOZQYNCRqIiEV/Ut Y/PSYa5B0pfjdqpgmcVCwfyTDItYkS0Nj4G9WPxEkYu9cTB8J2Z54IsDm RLVQtEiMBO3EG99EiyDZ5uoQ/0a3Y0jrrWHE8Mql4G3xmDaoJf697wvMw 65HKSc20o2lmDKvwFDcy7PdqHNuIvs4DmUEQfdHG09RZDoB9cCy36xtYf Q==; X-CSE-ConnectionGUID: ILzAxVeVTwe3stBcz3SgSg== X-CSE-MsgGUID: z91ceqQuR7mrBgmx9p6r9g== X-IronPort-AV: E=McAfee;i="6700,10204,11141"; a="19310172" X-IronPort-AV: E=Sophos;i="6.09,230,1716274800"; d="scan'208,217";a="19310172" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2024 03:26:34 -0700 X-CSE-ConnectionGUID: 8HUVsrBaQW+5peK+vunP7A== X-CSE-MsgGUID: kV7/uL7cRuKRYeLVEhXgCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,230,1716274800"; d="scan'208,217";a="83203349" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 23 Jul 2024 03:26:34 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 23 Jul 2024 03:26:32 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 23 Jul 2024 03:26:32 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 23 Jul 2024 03:26:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gTRMPLQ9TLGg/1iKTm3HvA/rAaii/8tEapSRIEq0rN+8UMaEgu7VSh/5U5pZXYwdqS7U9ym2iV8pxeXeijkaqebfnBQT7sH8Org+FSlxWVJrGNrR6KjyjYEg0gmjZmVSF3zgweBblbWehH3TlKW+ZIPC/VJzbg/lwfAvqLeWw5CDRLEZLWa93vYzmD6DuqnAsxftcsy3zHsHDCfKuPprOwfKdWH0Ee2KcUvMSC+dt2qAqAv4lVLlovXn4cNccYlFvEd659AFqS6+9OWBYrccLOxMHqt+dQsozCNeebYa1E5JTmtIJx6ljHb14SABQJJWKTIGZ2rJj4AQ+DcLEw+OZA== 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=AJFwzQ81XBw+w/TrgyqL3b0KC4bb2GyspY0fqraihMI=; b=pEnorCvyXNpLR1FT18u2fjhxAmKNxET8usBAUu2J5CDMQfvK0gBtpAQepg6uvowbIdPbuJGLtX65pH0P0mhx+D9BbiPyT7CG2OoBwfKduQ/BgpG+Dq4brbtX9bNdFwrhpPMthTOomSOH3YiWHSm6x5YPLjKz1O3vACrMWJl5MnI0oOEHacE1AzNkT/uionfvYR2/1JqzqVAl1X5om+fAr5Ov0mN5Ea+eTNN37Uvod+/HEQfO36XTRP+i5ULrBchyuhPdRmgGfLSFpeUa2SoANb7BKVVqzqX/qQv3gWEymnqDjmXb6KNWG/NBD7ilR2Dt68XrpKwarrldFsvyRoFTIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from LV3PR11MB8579.namprd11.prod.outlook.com (2603:10b6:408:1b6::7) by SA1PR11MB6966.namprd11.prod.outlook.com (2603:10b6:806:2bc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Tue, 23 Jul 2024 10:26:29 +0000 Received: from LV3PR11MB8579.namprd11.prod.outlook.com ([fe80::ec3c:7b9a:2442:1ce4]) by LV3PR11MB8579.namprd11.prod.outlook.com ([fe80::ec3c:7b9a:2442:1ce4%4]) with mapi id 15.20.7784.016; Tue, 23 Jul 2024 10:26:29 +0000 Content-Type: multipart/alternative; boundary="------------sqczMHiXccRW08q3kGTrSTf6" Message-ID: Date: Tue, 23 Jul 2024 11:26:24 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/4] power: refactor uncore power management library To: Sivaprasad Tummala , , , , , , CC: References: <20240220153326.6236-1-sivaprasad.tummala@amd.com> <20240720165030.246294-1-sivaprasad.tummala@amd.com> <20240720165030.246294-3-sivaprasad.tummala@amd.com> Content-Language: en-US From: "Hunt, David" In-Reply-To: <20240720165030.246294-3-sivaprasad.tummala@amd.com> X-ClientProxiedBy: DU7PR01CA0021.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::9) To LV3PR11MB8579.namprd11.prod.outlook.com (2603:10b6:408:1b6::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV3PR11MB8579:EE_|SA1PR11MB6966:EE_ X-MS-Office365-Filtering-Correlation-Id: 774b7254-5a8a-4695-4e7e-08dcab01ea25 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?YU1IbG95R2t0VVIwQUN2aVVNZm9CMzZjMElRcjFDMUQwRlZyNVJCWUlTdXh4?= =?utf-8?B?bmhMM05nbDJlNll2cDUraVdyNU05Qlh6TThIOGthc213UW9mcithWk40REIw?= =?utf-8?B?dFdSK25jeTNXeHMrWFh6bDZ4NkhZVlpXRURhZFM3Y2RpdzBFK3B5RU85emIy?= =?utf-8?B?YVB5VTJVZTdUejkwemp6cy9DNklhYUgzRG1yVzZvQk15emFDbWlHTFpEa05H?= =?utf-8?B?WnJqQks4bUFna25KZG5BODNTNFFqZnV0dlBUdFZLM1hYTE1Qd0tmZm1Yc3Y5?= =?utf-8?B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?bStlazVaKzVLa2luVkxqeEp6MEFJVlpPTmpLRUpxTnZ6c1JxZFFlQjdkT2I2?= =?utf-8?B?OXNSUUthdjVGZW5sd1AvMjNUZ29lM3FZUTkzdHJhY1JOVFh2bXRVYnBHYU1z?= =?utf-8?B?b1FQQVNvOU8zajRXUVNjT1BrYTgzL0daNCtRUkFMTFVJK0cxUjBJdmhsY1pz?= =?utf-8?B?R0t3UGNDV3B0cEhidjc5Q2sxZGtTK01pSmc0ZWtRVDQyQThLUldmQVNUeHRQ?= =?utf-8?B?Q0J4NmViZ0Z0eVFPaGpVRi9TcmpaTFc4ajRRaDR2RGFQVGUvbTlNMFd4Yito?= =?utf-8?B?VmdrODFKNGxHaEUvS01lR3o4OHJ5dENyVXZvSkFISWx2SzMxZTNxM2RQUE9M?= =?utf-8?B?ay92ODMvUWhvVGZMbzJZR0tST1UxVE9jRkpRSmNDWkNudXJxKzYyQzJPV0lE?= =?utf-8?B?SjJwb1RIV2lPQkxXdDM1VjlRWkt6Y0x3WE9aV1AvOGt0eXcrY01QTDM2TTJJ?= =?utf-8?B?UzFMa2RrRGRvdCtzWHkwUndZN09OWm91OUovdVo2eWNhZXdCRkhsSGhHakM2?= =?utf-8?B?MGZLRzBmSnZPVFZ1M1dMTmtvSlNyenQvUmRsM0hJRHVXcmZiaG12a0wvT0VO?= =?utf-8?B?WjJsNW9haFM5d0EyV2Q4UT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV3PR11MB8579.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?STBhTkVscEZTN00yYWFKL0Vxa29yNlBIOEl1OGFJR0MwcTFQZ0RzakdRZURB?= =?utf-8?B?REEzdWlkclJjcnZyWm5YamNDN2Q0R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8?B?UG5NV3d6NkhDdURiR3loSUdjUWxyVVprVzV2dlN0eU1EUFJYY1NQZTc3TjA1?= =?utf-8?B?S3VJcHc0RU5jQ1pvUTl2RkxaU1VIa09PTmZET3dKbGJVcXppN1lSNS8zeUd4?= =?utf-8?B?RVJPSUZlYVpBeXFOekNJUmE5ZlZMdUZJMGVCNHZxTmpKajB0cFZDbHNIU2Rh?= =?utf-8?B?US9pT3dzSmFuY2EvSnFPUG1qdkd3bm1aM21vdDExTDhURVdHcy9OWVdnWHp1?= =?utf-8?B?dEd3RThEVnBlMkMrUHp4QnBHbHVRM2NkSk85ckNjNWsxRjVaSm9rM0s0ZlEw?= =?utf-8?B?Y0E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 774b7254-5a8a-4695-4e7e-08dcab01ea25 X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8579.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 10:26:29.3153 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YQOmdIankzbz55sezNdtQPI90Em9T/Jomm9mkJ2c5PgbPCBZem2k7ztL/JJaXg9tGIOFF0Y+LME3EXh8qPvTng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6966 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --------------sqczMHiXccRW08q3kGTrSTf6 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit On 20/07/2024 17:50, Sivaprasad Tummala wrote: > This patch refactors the power management library, addressing uncore > power management. The primary changes involve the creation of dedicated > directories for each driver within 'drivers/power/uncore/*'. The > adjustment of meson.build files enables the selective activation > of individual drivers. > > This refactor significantly improves code organization, enhances > clarity and boosts maintainability. It lays the foundation for more > focused development on individual drivers and facilitates seamless > integration of future enhancements, particularly the AMD uncore driver. > > Signed-off-by: Sivaprasad Tummala > --- > .../power/intel_uncore/intel_uncore.c | 18 +- > .../power/intel_uncore/intel_uncore.h | 8 +- > drivers/power/intel_uncore/meson.build | 7 + > drivers/power/meson.build | 3 +- > lib/power/meson.build | 2 +- > lib/power/rte_power_uncore.c | 206 ++++++--------- > lib/power/rte_power_uncore.h | 91 ++++--- > lib/power/rte_power_uncore_ops.h | 239 ++++++++++++++++++ > lib/power/version.map | 1 + > 9 files changed, 406 insertions(+), 169 deletions(-) > rename lib/power/power_intel_uncore.c => drivers/power/intel_uncore/intel_uncore.c (95%) > rename lib/power/power_intel_uncore.h => drivers/power/intel_uncore/intel_uncore.h (97%) > create mode 100644 drivers/power/intel_uncore/meson.build > create mode 100644 lib/power/rte_power_uncore_ops.h > --snip-- > > diff --git a/lib/power/rte_power_uncore.c b/lib/power/rte_power_uncore.c > index 48c75a5da0..127f6ed212 100644 > --- a/lib/power/rte_power_uncore.c > +++ b/lib/power/rte_power_uncore.c > @@ -1,6 +1,6 @@ > /* SPDX-License-Identifier: BSD-3-Clause > * Copyright(c) 2010-2014 Intel Corporation > - * Copyright(c) 2023 AMD Corporation > + * Copyright(c) 2024 Advanced Micro Devices, Inc. > */ > --snip-- > +struct rte_power_uncore_ops * > +rte_power_get_uncore_ops(void) > +{ > + RTE_ASSERT(global_uncore_ops != NULL); I'm only seeing this now after sending the email for the first patch. This would be a good solution for the global_core_ops check in rte_power_get_core_ops() in rte_power.c,  and would be the smaller change, rather than checking everywhere rte_power_get_env() is called. > + > + return global_uncore_ops; > } > --snip-- --------------sqczMHiXccRW08q3kGTrSTf6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit


On 20/07/2024 17:50, Sivaprasad Tummala wrote:
This patch refactors the power management library, addressing uncore
power management. The primary changes involve the creation of dedicated
directories for each driver within 'drivers/power/uncore/*'. The
adjustment of meson.build files enables the selective activation
of individual drivers.

This refactor significantly improves code organization, enhances
clarity and boosts maintainability. It lays the foundation for more
focused development on individual drivers and facilitates seamless
integration of future enhancements, particularly the AMD uncore driver.

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
---
 .../power/intel_uncore/intel_uncore.c         |  18 +-
 .../power/intel_uncore/intel_uncore.h         |   8 +-
 drivers/power/intel_uncore/meson.build        |   7 +
 drivers/power/meson.build                     |   3 +-
 lib/power/meson.build                         |   2 +-
 lib/power/rte_power_uncore.c                  | 206 ++++++---------
 lib/power/rte_power_uncore.h                  |  91 ++++---
 lib/power/rte_power_uncore_ops.h              | 239 ++++++++++++++++++
 lib/power/version.map                         |   1 +
 9 files changed, 406 insertions(+), 169 deletions(-)
 rename lib/power/power_intel_uncore.c => drivers/power/intel_uncore/intel_uncore.c (95%)
 rename lib/power/power_intel_uncore.h => drivers/power/intel_uncore/intel_uncore.h (97%)
 create mode 100644 drivers/power/intel_uncore/meson.build
 create mode 100644 lib/power/rte_power_uncore_ops.h


--snip--



diff --git a/lib/power/rte_power_uncore.c b/lib/power/rte_power_uncore.c
index 48c75a5da0..127f6ed212 100644
--- a/lib/power/rte_power_uncore.c
+++ b/lib/power/rte_power_uncore.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2010-2014 Intel Corporation
- * Copyright(c) 2023 AMD Corporation
+ * Copyright(c) 2024 Advanced Micro Devices, Inc.
  */
 


--snip--


+struct rte_power_uncore_ops *
+rte_power_get_uncore_ops(void)
+{
+	RTE_ASSERT(global_uncore_ops != NULL);


I'm only seeing this now after sending the email for the first patch. This would be a good solution for the global_core_ops check in rte_power_get_core_ops() in rte_power.c,  and would be the smaller change, rather than checking everywhere rte_power_get_env() is called.


+
+	return global_uncore_ops;
 }
 


--snip--



--------------sqczMHiXccRW08q3kGTrSTf6--