From: David Marchand <david.marchand@redhat.com>
To: stable@dpdk.org, xuemingl@nvidia.com
Subject: [23.11 2/2] power: fix log message when checking lcore ID
Date: Thu, 12 Dec 2024 14:23:58 +0100 [thread overview]
Message-ID: <20241212132358.602485-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20241212132358.602485-1-david.marchand@redhat.com>
Caught while inspecting changes backported in 23.11 LTS branch.
The POWER_LOG() macro in the main branch automatically appends a \n
which is not done by RTE_LOG().
Fixes: 1afa4c7c5ea6 ("power: fix mapped lcore ID")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/power/power_amd_pstate_cpufreq.c | 2 +-
lib/power/power_common.c | 4 ++--
lib/power/power_pstate_cpufreq.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/power/power_amd_pstate_cpufreq.c b/lib/power/power_amd_pstate_cpufreq.c
index 7b8e77003f..ff63e91183 100644
--- a/lib/power/power_amd_pstate_cpufreq.c
+++ b/lib/power/power_amd_pstate_cpufreq.c
@@ -377,7 +377,7 @@ power_amd_pstate_cpufreq_init(unsigned int lcore_id)
}
if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
- RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id);
return -1;
}
diff --git a/lib/power/power_common.c b/lib/power/power_common.c
index 8ffb49ef8f..ee0c264c8d 100644
--- a/lib/power/power_common.c
+++ b/lib/power/power_common.c
@@ -211,8 +211,8 @@ int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id)
lcore_cpus = rte_lcore_cpuset(lcore_id);
if (CPU_COUNT(&lcore_cpus) != 1) {
- RTE_LOG(ERR, POWER, "Power library does not support lcore %u mapping to %u CPUs", lcore_id,
- CPU_COUNT(&lcore_cpus));
+ RTE_LOG(ERR, POWER, "Power library does not support lcore %u mapping to %u CPUs\n",
+ lcore_id, CPU_COUNT(&lcore_cpus));
return -1;
}
diff --git a/lib/power/power_pstate_cpufreq.c b/lib/power/power_pstate_cpufreq.c
index 890875bd93..fa9ef2aa8a 100644
--- a/lib/power/power_pstate_cpufreq.c
+++ b/lib/power/power_pstate_cpufreq.c
@@ -565,7 +565,7 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
}
if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
- RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id);
return -1;
}
--
2.47.0
next prev parent reply other threads:[~2024-12-12 13:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 13:23 [23.11 1/2] log: remove per line log helper David Marchand
2024-12-12 13:23 ` David Marchand [this message]
2024-12-12 14:08 ` [23.11 2/2] power: fix log message when checking lcore ID Xueming Li
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=20241212132358.602485-2-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=stable@dpdk.org \
--cc=xuemingl@nvidia.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).