patch 'power: fix number of uncore frequencies' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:50:19 CEST 2024
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 <xuemingl at nvidia.com>
---
>From b53fb811c0cf187dcf54bd65f32af6deba0eb04b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Mon, 22 Jul 2024 13:15:22 -0700
Subject: [PATCH] power: fix number of uncore frequencies
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 <stephen at networkplumber.org>
Acked-by: David Hunt <david.hunt at intel.com>
---
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 <rte_power_uncore.h>
#include <power_common.h>
-#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 <xuemingl at nvidia.com>
+
+[ upstream commit 93db1cfcc36ac1808c4a09ec50a470c6127b859e ]
@@ -12 +14,0 @@
-Cc: stable at 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",
More information about the stable
mailing list