DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	David Hunt <david.hunt@intel.com>,
	Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Subject: [PATCH v4 7/7] power: separate public and driver headers
Date: Thu, 25 Sep 2025 14:31:49 +0200	[thread overview]
Message-ID: <20250925123150.3063298-8-david.marchand@redhat.com> (raw)
In-Reply-To: <20250925123150.3063298-1-david.marchand@redhat.com>

power_cpufreq.h, power_common.h and power_uncore_ops.h look like driver
only headers, but were included from public headers.
Move them to the driver_sdk_headers list.

There is one complication though for power_cpufreq.h as it was included
from a public header rte_power_cpufreq.h.
Move the rte_power_core_capabilities struct definition to the public
header, since a (stable) public symbol relies on it.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/power/meson.build         |  7 +++++--
 lib/power/power_cpufreq.h     | 14 +-------------
 lib/power/power_uncore_ops.h  |  1 +
 lib/power/rte_power_cpufreq.c |  2 +-
 lib/power/rte_power_cpufreq.h | 15 +++++++++++++--
 lib/power/rte_power_uncore.c  |  2 +-
 lib/power/rte_power_uncore.h  |  3 ++-
 7 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/lib/power/meson.build b/lib/power/meson.build
index 56b59071ea..d89fb55514 100644
--- a/lib/power/meson.build
+++ b/lib/power/meson.build
@@ -22,12 +22,15 @@ sources = files(
         'rte_power_uncore.c',
 )
 headers = files(
-        'power_cpufreq.h',
-        'power_uncore_ops.h',
         'rte_power_cpufreq.h',
         'rte_power_pmd_mgmt.h',
         'rte_power_qos.h',
         'rte_power_uncore.h',
 )
+driver_sdk_headers = files(
+        'power_common.h',
+        'power_cpufreq.h',
+        'power_uncore_ops.h',
+)
 
 deps += ['timer', 'ethdev']
diff --git a/lib/power/power_cpufreq.h b/lib/power/power_cpufreq.h
index 92f1ab8f37..fb0b7feb82 100644
--- a/lib/power/power_cpufreq.h
+++ b/lib/power/power_cpufreq.h
@@ -14,6 +14,7 @@
 #include <rte_common.h>
 #include <rte_log.h>
 #include <rte_compat.h>
+#include <rte_power_cpufreq.h>
 
 #define RTE_POWER_DRIVER_NAMESZ 24
 
@@ -131,19 +132,6 @@ typedef int (*rte_power_freq_change_t)(unsigned int lcore_id);
  *  - Negative on error.
  */
 
-/**
- * Power capabilities summary.
- */
-struct rte_power_core_capabilities {
-	union {
-		uint64_t capabilities;
-		struct {
-			uint64_t turbo:1;       /**< Turbo can be enabled. */
-			uint64_t priority:1;    /**< SST-BF high freq core */
-		};
-	};
-};
-
 typedef int (*rte_power_get_capabilities_t)(unsigned int lcore_id,
 			struct rte_power_core_capabilities *caps);
 
diff --git a/lib/power/power_uncore_ops.h b/lib/power/power_uncore_ops.h
index b92af28df9..783860ee5b 100644
--- a/lib/power/power_uncore_ops.h
+++ b/lib/power/power_uncore_ops.h
@@ -13,6 +13,7 @@
 
 #include <rte_compat.h>
 #include <rte_common.h>
+#include <rte_power_uncore.h>
 
 #define RTE_POWER_UNCORE_DRIVER_NAMESZ 24
 
diff --git a/lib/power/rte_power_cpufreq.c b/lib/power/rte_power_cpufreq.c
index d4db03a4e5..f63e976dc2 100644
--- a/lib/power/rte_power_cpufreq.c
+++ b/lib/power/rte_power_cpufreq.c
@@ -6,8 +6,8 @@
 #include <rte_spinlock.h>
 #include <rte_debug.h>
 
-#include "rte_power_cpufreq.h"
 #include "power_common.h"
+#include "power_cpufreq.h"
 
 static enum power_management_env global_default_env = PM_ENV_NOT_SET;
 static struct rte_power_cpufreq_ops *global_cpufreq_ops;
diff --git a/lib/power/rte_power_cpufreq.h b/lib/power/rte_power_cpufreq.h
index 82d274214b..1605ba866a 100644
--- a/lib/power/rte_power_cpufreq.h
+++ b/lib/power/rte_power_cpufreq.h
@@ -14,8 +14,6 @@
 #include <rte_common.h>
 #include <rte_log.h>
 
-#include "power_cpufreq.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -248,6 +246,19 @@ int rte_power_freq_enable_turbo(unsigned int lcore_id);
  */
 int rte_power_freq_disable_turbo(unsigned int lcore_id);
 
+/**
+ * Power capabilities summary.
+ */
+struct rte_power_core_capabilities {
+	union {
+		uint64_t capabilities;
+		struct {
+			uint64_t turbo:1;       /**< Turbo can be enabled. */
+			uint64_t priority:1;    /**< SST-BF high freq core */
+		};
+	};
+};
+
 /**
  * Returns power capabilities for a specific lcore.
  * Function pointer definition. Review each environments
diff --git a/lib/power/rte_power_uncore.c b/lib/power/rte_power_uncore.c
index 30cd374127..25bdb113c5 100644
--- a/lib/power/rte_power_uncore.c
+++ b/lib/power/rte_power_uncore.c
@@ -7,8 +7,8 @@
 #include <rte_spinlock.h>
 #include <rte_debug.h>
 
-#include "rte_power_uncore.h"
 #include "power_common.h"
+#include "power_uncore_ops.h"
 
 static enum rte_uncore_power_mgmt_env global_uncore_env = RTE_UNCORE_PM_ENV_NOT_SET;
 static struct rte_power_uncore_ops *global_uncore_ops;
diff --git a/lib/power/rte_power_uncore.h b/lib/power/rte_power_uncore.h
index dfeade77e9..66aea1b37f 100644
--- a/lib/power/rte_power_uncore.h
+++ b/lib/power/rte_power_uncore.h
@@ -11,7 +11,8 @@
  * Uncore Frequency Management
  */
 
-#include "power_uncore_ops.h"
+#include <rte_compat.h>
+#include <rte_common.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
2.51.0


  parent reply	other threads:[~2025-09-25 12:32 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 11:26 [RFC 0/6] Add a stricter headers check David Marchand
2024-11-27 11:26 ` [RFC 1/6] baseband/acc: fix exported header David Marchand
2024-11-27 11:26 ` [RFC 2/6] drivers: drop export of driver headers David Marchand
2024-11-27 11:26 ` [RFC 3/6] eventdev: do not include driver header in DMA adapter David Marchand
2024-11-27 13:49   ` [EXTERNAL] " Amit Prakash Shukla
2024-11-27 11:26 ` [RFC 4/6] drivers: fix exported headers David Marchand
2024-11-27 11:26 ` [RFC 5/6] build: install indirect headers to a dedicated directory David Marchand
2024-11-27 11:42   ` Bruce Richardson
2024-12-10 13:36     ` David Marchand
2024-11-27 11:26 ` [RFC 6/6] buildtools: externally check exported headers David Marchand
2024-12-13 10:50 ` [PATCH v2 0/6] Add a stricter headers check David Marchand
2024-12-13 10:50   ` [PATCH v2 1/6] baseband/acc: fix exported header David Marchand
2024-12-13 11:01     ` Bruce Richardson
2024-12-13 10:50   ` [PATCH v2 2/6] drivers: drop export of driver headers David Marchand
2024-12-13 11:03     ` Bruce Richardson
2024-12-16  9:13       ` Andrew Rybchenko
2024-12-13 10:50   ` [PATCH v2 3/6] eventdev: do not include driver header in DMA adapter David Marchand
2024-12-13 11:04     ` Bruce Richardson
2024-12-13 10:50   ` [PATCH v2 4/6] drivers: fix exported headers David Marchand
2024-12-13 11:14     ` Bruce Richardson
2024-12-13 13:46       ` David Marchand
2024-12-16  8:15         ` David Marchand
2024-12-13 17:10     ` Stephen Hemminger
2024-12-13 10:50   ` [PATCH v2 5/6] build: install indirect headers to a dedicated directory David Marchand
2024-12-13 10:50   ` [PATCH v2 6/6] buildtools: externally check exported headers David Marchand
2024-12-13 11:27   ` [PATCH v2 0/6] Add a stricter headers check Bruce Richardson
2024-12-13 13:38     ` David Marchand
2025-09-24 17:25 ` [PATCH v3 0/7] " David Marchand
2025-09-24 17:25   ` [PATCH v3 1/7] baseband/acc: fix exported header David Marchand
2025-09-24 17:25   ` [PATCH v3 2/7] drivers: drop export of driver headers David Marchand
2025-09-24 17:25   ` [PATCH v3 3/7] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-24 17:25   ` [PATCH v3 4/7] gpudev: fix driver header for Windows David Marchand
2025-09-25  7:53     ` Bruce Richardson
2025-09-25  8:43       ` David Marchand
2025-09-24 17:25   ` [PATCH v3 5/7] drivers: fix some exported headers David Marchand
2025-09-24 17:25   ` [PATCH v3 6/7] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-25  8:00     ` Bruce Richardson
2025-09-25  8:42       ` David Marchand
2025-09-25  9:22         ` Bruce Richardson
2025-09-25 10:29           ` David Marchand
2025-09-25 10:31             ` Bruce Richardson
2025-09-25  9:31         ` Bruce Richardson
2025-09-25 10:17           ` Morten Brørup
2025-09-25 10:22             ` Bruce Richardson
2025-09-25 10:22           ` David Marchand
2025-09-25 10:31             ` Bruce Richardson
2025-09-24 17:25   ` [PATCH v3 7/7] power: separate public and driver headers David Marchand
2025-09-25 12:31 ` [PATCH v4 0/7] Add a stricter headers check David Marchand
2025-09-25 12:31   ` [PATCH v4 1/7] baseband/acc: fix exported header David Marchand
2025-09-25 12:31   ` [PATCH v4 2/7] drivers: drop export of driver headers David Marchand
2025-09-25 12:34     ` [EXTERNAL] " Akhil Goyal
2025-09-25 12:31   ` [PATCH v4 3/7] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-25 12:31   ` [PATCH v4 4/7] gpudev: fix driver header for Windows David Marchand
2025-09-25 12:43     ` Bruce Richardson
2025-09-25 12:31   ` [PATCH v4 5/7] drivers: fix some exported headers David Marchand
2025-09-25 12:44     ` Bruce Richardson
2025-09-25 12:31   ` [PATCH v4 6/7] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-25 14:46     ` Bruce Richardson
2025-09-26  8:14       ` David Marchand
2025-09-26  9:06         ` Bruce Richardson
2025-09-26  9:18           ` David Marchand
2025-09-25 12:31   ` David Marchand [this message]
2025-09-26 12:40 ` [PATCH v5 0/9] Add a stricter headers check David Marchand
2025-09-26 12:40   ` [PATCH v5 1/9] baseband/acc: fix exported header David Marchand
2025-09-26 12:40   ` [PATCH v5 2/9] drivers: drop export of driver headers David Marchand
2025-09-26 12:40   ` [PATCH v5 3/9] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-26 12:40   ` [PATCH v5 4/9] gpudev: fix driver header for Windows David Marchand
2025-09-26 12:40   ` [PATCH v5 5/9] drivers: fix some exported headers David Marchand
2025-09-26 12:40   ` [PATCH v5 6/9] eal/arm: fix C++ build for 32-bit memcpy David Marchand
2025-09-26 13:01     ` Bruce Richardson
2025-09-26 19:55     ` Morten Brørup
2025-09-26 12:41   ` [PATCH v5 7/9] build: factorize headers installation David Marchand
2025-09-26 13:08     ` Bruce Richardson
2025-09-26 12:41   ` [PATCH v5 8/9] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-26 12:41   ` [PATCH v5 9/9] power: separate public and driver headers David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250925123150.3063298-8-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=sivaprasad.tummala@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).