[dpdk-stable] patch 'power: fix namespace for internal struct' has been queued to stable release 19.11.10
christian.ehrhardt at canonical.com
christian.ehrhardt at canonical.com
Tue Aug 10 17:39:26 CEST 2021
Hi,
FYI, your patch has been queued to stable release 19.11.10
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/12/21. 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://github.com/cpaelzer/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/4b0cbc869ae8c882ab15d1c8ae8247832afe05da
Thanks.
Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
>From 4b0cbc869ae8c882ab15d1c8ae8247832afe05da Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Thu, 8 Jul 2021 16:38:22 +0100
Subject: [PATCH] power: fix namespace for internal struct
[ upstream commit 02a6d683113428f87e2375ba249b9c40ae46ff79 ]
Currently, ACPI code uses rte_power_info as the struct name, which
gives the appearance that this is an externally visible API. Fix to
use internal namespace.
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: David Hunt <david.hunt at intel.com>
---
lib/librte_power/power_acpi_cpufreq.c | 34 +++++++++++++--------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
index 63859bcd70..9b31112348 100644
--- a/lib/librte_power/power_acpi_cpufreq.c
+++ b/lib/librte_power/power_acpi_cpufreq.c
@@ -78,7 +78,7 @@ enum power_state {
/**
* Power info per lcore.
*/
-struct rte_power_info {
+struct acpi_power_info {
unsigned int lcore_id; /**< Logical core id */
uint32_t freqs[RTE_MAX_LCORE_FREQS]; /**< Frequency array */
uint32_t nb_freqs; /**< number of available freqs */
@@ -90,14 +90,14 @@ struct rte_power_info {
uint16_t turbo_enable; /**< Turbo Boost enable/disable */
} __rte_cache_aligned;
-static struct rte_power_info lcore_power_info[RTE_MAX_LCORE];
+static struct acpi_power_info lcore_power_info[RTE_MAX_LCORE];
/**
* It is to set specific freq for specific logical core, according to the index
* of supported frequencies.
*/
static int
-set_freq_internal(struct rte_power_info *pi, uint32_t idx)
+set_freq_internal(struct acpi_power_info *pi, uint32_t idx)
{
if (idx >= RTE_MAX_LCORE_FREQS || idx >= pi->nb_freqs) {
RTE_LOG(ERR, POWER, "Invalid frequency index %u, which "
@@ -133,7 +133,7 @@ set_freq_internal(struct rte_power_info *pi, uint32_t idx)
* governor will be saved for rolling back.
*/
static int
-power_set_governor_userspace(struct rte_power_info *pi)
+power_set_governor_userspace(struct acpi_power_info *pi)
{
FILE *f;
int ret = -1;
@@ -189,7 +189,7 @@ out:
* sys file.
*/
static int
-power_get_available_freqs(struct rte_power_info *pi)
+power_get_available_freqs(struct acpi_power_info *pi)
{
FILE *f;
int ret = -1, i, count;
@@ -259,7 +259,7 @@ out:
* It is to fopen the sys file for the future setting the lcore frequency.
*/
static int
-power_init_for_setting_freq(struct rte_power_info *pi)
+power_init_for_setting_freq(struct acpi_power_info *pi)
{
FILE *f;
char fullpath[PATH_MAX];
@@ -293,7 +293,7 @@ out:
int
power_acpi_cpufreq_init(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n",
@@ -355,7 +355,7 @@ fail:
* needed by writing the sys file.
*/
static int
-power_set_governor_original(struct rte_power_info *pi)
+power_set_governor_original(struct acpi_power_info *pi)
{
FILE *f;
int ret = -1;
@@ -401,7 +401,7 @@ out:
int
power_acpi_cpufreq_exit(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n",
@@ -443,7 +443,7 @@ fail:
uint32_t
power_acpi_cpufreq_freqs(unsigned int lcore_id, uint32_t *freqs, uint32_t num)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
@@ -490,7 +490,7 @@ power_acpi_cpufreq_set_freq(unsigned int lcore_id, uint32_t index)
int
power_acpi_cpufreq_freq_down(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
@@ -508,7 +508,7 @@ power_acpi_cpufreq_freq_down(unsigned int lcore_id)
int
power_acpi_cpufreq_freq_up(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
@@ -549,7 +549,7 @@ power_acpi_cpufreq_freq_max(unsigned int lcore_id)
int
power_acpi_cpufreq_freq_min(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
@@ -566,7 +566,7 @@ power_acpi_cpufreq_freq_min(unsigned int lcore_id)
int
power_acpi_turbo_status(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
@@ -582,7 +582,7 @@ power_acpi_turbo_status(unsigned int lcore_id)
int
power_acpi_enable_turbo(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
@@ -615,7 +615,7 @@ power_acpi_enable_turbo(unsigned int lcore_id)
int
power_acpi_disable_turbo(unsigned int lcore_id)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
@@ -642,7 +642,7 @@ power_acpi_disable_turbo(unsigned int lcore_id)
int power_acpi_get_capabilities(unsigned int lcore_id,
struct rte_power_core_capabilities *caps)
{
- struct rte_power_info *pi;
+ struct acpi_power_info *pi;
if (lcore_id >= RTE_MAX_LCORE) {
RTE_LOG(ERR, POWER, "Invalid lcore ID\n");
--
2.32.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-10 15:11:14.810048247 +0200
+++ 0046-power-fix-namespace-for-internal-struct.patch 2021-08-10 15:11:13.010638042 +0200
@@ -1 +1 @@
-From 02a6d683113428f87e2375ba249b9c40ae46ff79 Mon Sep 17 00:00:00 2001
+From 4b0cbc869ae8c882ab15d1c8ae8247832afe05da Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 02a6d683113428f87e2375ba249b9c40ae46ff79 ]
+
@@ -13 +15 @@
- lib/power/power_acpi_cpufreq.c | 34 +++++++++++++++++-----------------
+ lib/librte_power/power_acpi_cpufreq.c | 34 +++++++++++++--------------
@@ -16,4 +18,4 @@
-diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c
-index d028a9947f..1b8c69cc8b 100644
---- a/lib/power/power_acpi_cpufreq.c
-+++ b/lib/power/power_acpi_cpufreq.c
+diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
+index 63859bcd70..9b31112348 100644
+--- a/lib/librte_power/power_acpi_cpufreq.c
++++ b/lib/librte_power/power_acpi_cpufreq.c
@@ -73 +75 @@
-@@ -299,7 +299,7 @@ power_acpi_cpufreq_check_supported(void)
+@@ -293,7 +293,7 @@ out:
@@ -79 +80,0 @@
- uint32_t exp_state;
@@ -82 +83,2 @@
-@@ -374,7 +374,7 @@ fail:
+ RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n",
+@@ -355,7 +355,7 @@ fail:
@@ -91 +93 @@
-@@ -420,7 +420,7 @@ out:
+@@ -401,7 +401,7 @@ out:
@@ -97 +98,0 @@
- uint32_t exp_state;
@@ -100 +101,2 @@
-@@ -475,7 +475,7 @@ fail:
+ RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n",
+@@ -443,7 +443,7 @@ fail:
@@ -109 +111 @@
-@@ -522,7 +522,7 @@ power_acpi_cpufreq_set_freq(unsigned int lcore_id, uint32_t index)
+@@ -490,7 +490,7 @@ power_acpi_cpufreq_set_freq(unsigned int lcore_id, uint32_t index)
@@ -118 +120 @@
-@@ -540,7 +540,7 @@ power_acpi_cpufreq_freq_down(unsigned int lcore_id)
+@@ -508,7 +508,7 @@ power_acpi_cpufreq_freq_down(unsigned int lcore_id)
@@ -127 +129 @@
-@@ -581,7 +581,7 @@ power_acpi_cpufreq_freq_max(unsigned int lcore_id)
+@@ -549,7 +549,7 @@ power_acpi_cpufreq_freq_max(unsigned int lcore_id)
@@ -136 +138 @@
-@@ -598,7 +598,7 @@ power_acpi_cpufreq_freq_min(unsigned int lcore_id)
+@@ -566,7 +566,7 @@ power_acpi_cpufreq_freq_min(unsigned int lcore_id)
@@ -145 +147 @@
-@@ -614,7 +614,7 @@ power_acpi_turbo_status(unsigned int lcore_id)
+@@ -582,7 +582,7 @@ power_acpi_turbo_status(unsigned int lcore_id)
@@ -154 +156 @@
-@@ -647,7 +647,7 @@ power_acpi_enable_turbo(unsigned int lcore_id)
+@@ -615,7 +615,7 @@ power_acpi_enable_turbo(unsigned int lcore_id)
@@ -163 +165 @@
-@@ -674,7 +674,7 @@ power_acpi_disable_turbo(unsigned int lcore_id)
+@@ -642,7 +642,7 @@ power_acpi_disable_turbo(unsigned int lcore_id)
More information about the stable
mailing list