patch 'examples/vm_power_manager: fix const discarding' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:19:10 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/26. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/45d35d5f7b2d5f3d9f6e00d56ef70333a5ddb5ec
Thanks.
Luca Boccassi
---
>From 45d35d5f7b2d5f3d9f6e00d56ef70333a5ddb5ec Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 1 Apr 2026 11:19:19 +0200
Subject: [PATCH] examples/vm_power_manager: fix const discarding
[ upstream commit 629d136b2501aabb85a49205c049f71ed170c790 ]
When compiling with GCC 15.2.1, a const qualifier issue
is seen with this warning:
In function 'get_resource_name_from_chn_path':
examples/vm_power_manager/channel_monitor.c:139:16:
error: assignment discards 'const' qualifier from pointer target type
139 | substr = strstr(channel_path, CHANNEL_MGR_FIFO_PATTERN_NAME);
| ^
The function get_resource_name_from_chn_path is used only once
and call a single function (strstr),
so it can be replaced with a direct call to strstr().
Fixes: 221e7026d521 ("examples/power: add FIFO per core for JSON interface")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
examples/vm_power_manager/channel_monitor.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 800f733a26..3023e444a4 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -131,16 +131,6 @@ set_policy_mac(struct rte_power_channel_packet *pkt, int idx, char *mac)
return 0;
}
-static char*
-get_resource_name_from_chn_path(const char *channel_path)
-{
- char *substr = NULL;
-
- substr = strstr(channel_path, CHANNEL_MGR_FIFO_PATTERN_NAME);
-
- return substr;
-}
-
static int
get_resource_id_from_vmname(const char *vm_name)
{
@@ -1066,8 +1056,8 @@ read_json_packet(struct channel_info *chan_info)
root = json_loads(json_data, 0, &error);
if (root) {
- resource_name = get_resource_name_from_chn_path(
- chan_info->channel_path);
+ resource_name = strstr(chan_info->channel_path,
+ CHANNEL_MGR_FIFO_PATTERN_NAME);
/*
* Because our data is now in the json
* object, we can overwrite the pkt
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:01.438904415 +0100
+++ 0001-examples-vm_power_manager-fix-const-discarding.patch 2026-06-11 14:20:01.158744621 +0100
@@ -1 +1 @@
-From 629d136b2501aabb85a49205c049f71ed170c790 Mon Sep 17 00:00:00 2001
+From 45d35d5f7b2d5f3d9f6e00d56ef70333a5ddb5ec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 629d136b2501aabb85a49205c049f71ed170c790 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list