* [PATCH] service: fix getting service lcore attributes
@ 2024-12-20 14:29 Piotr Krzewinski
2024-12-20 15:56 ` Van Haaren, Harry
2024-12-23 9:50 ` Mattias Rönnblom
0 siblings, 2 replies; 3+ messages in thread
From: Piotr Krzewinski @ 2024-12-20 14:29 UTC (permalink / raw)
To: harry.van.haaren; +Cc: dev, Piotr Krzewinski, mattias.ronnblom, stable
Perf test service_perf_autotest was failing after introduction
of lcore variables. Fixed getting of idle_ and error_ service
call statistics.
Fixes: b24bbaedbba2 ("service: keep per-lcore state in lcore variable")
Cc: mattias.ronnblom@ericsson.com
Cc: stable@dpdk.org
Signed-off-by: Piotr Krzewinski <piotr.krzewinski@ericsson.com>
---
lib/eal/common/rte_service.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c
index dad3150df9..1821746337 100644
--- a/lib/eal/common/rte_service.c
+++ b/lib/eal/common/rte_service.c
@@ -879,7 +879,7 @@ lcore_attr_get_service_calls(uint32_t service_id, unsigned int lcore)
static uint64_t
lcore_attr_get_service_idle_calls(uint32_t service_id, unsigned int lcore)
{
- struct core_state *cs = &lcore_states[lcore];
+ struct core_state *cs = RTE_LCORE_VAR_LCORE(lcore, lcore_states);
return rte_atomic_load_explicit(&cs->service_stats[service_id].idle_calls,
rte_memory_order_relaxed);
@@ -888,7 +888,7 @@ lcore_attr_get_service_idle_calls(uint32_t service_id, unsigned int lcore)
static uint64_t
lcore_attr_get_service_error_calls(uint32_t service_id, unsigned int lcore)
{
- struct core_state *cs = &lcore_states[lcore];
+ struct core_state *cs = RTE_LCORE_VAR_LCORE(lcore, lcore_states);
return rte_atomic_load_explicit(&cs->service_stats[service_id].error_calls,
rte_memory_order_relaxed);
--
2.36.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] service: fix getting service lcore attributes
2024-12-20 14:29 [PATCH] service: fix getting service lcore attributes Piotr Krzewinski
@ 2024-12-20 15:56 ` Van Haaren, Harry
2024-12-23 9:50 ` Mattias Rönnblom
1 sibling, 0 replies; 3+ messages in thread
From: Van Haaren, Harry @ 2024-12-20 15:56 UTC (permalink / raw)
To: Krzewinski, Piotr; +Cc: dev, mattias.ronnblom, stable
[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]
> From: Piotr Krzewinski <piotr.krzewinski@ericsson.com>
> Sent: Friday, December 20, 2024 2:29 PM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>
> Cc: dev@dpdk.org <dev@dpdk.org>; Krzewinski, Piotr <piotr.krzewinski@ericsson.com>; mattias.ronnblom@ericsson.com <mattias.ronnblom@ericsson.com>; stable@dpdk.org <stable@dpdk.org>
> Subject: [PATCH] service: fix getting service lcore attributes
>
> Perf test service_perf_autotest was failing after introduction
> of lcore variables. Fixed getting of idle_ and error_ service
> call statistics.
>
> Fixes: b24bbaedbba2 ("service: keep per-lcore state in lcore variable")
> Cc: mattias.ronnblom@ericsson.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Piotr Krzewinski <piotr.krzewinski@ericsson.com>
Thanks - verified that these two occurrences were the last two of such kind in the file too!
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Side-note; seems CI flagged a warning, but not a real issue, artifact is empty
https://lab.dpdk.org/results/dashboard/patchsets/32181/
https://lab.dpdk.org/results/dashboard/testruns/logs/1492956/
> ---
> lib/eal/common/rte_service.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c
> index dad3150df9..1821746337 100644
> --- a/lib/eal/common/rte_service.c
> +++ b/lib/eal/common/rte_service.c
> @@ -879,7 +879,7 @@ lcore_attr_get_service_calls(uint32_t service_id, unsigned int lcore)
> static uint64_t
> lcore_attr_get_service_idle_calls(uint32_t service_id, unsigned int lcore)
> {
> - struct core_state *cs = &lcore_states[lcore];
> + struct core_state *cs = RTE_LCORE_VAR_LCORE(lcore, lcore_states);
>
> return rte_atomic_load_explicit(&cs->service_stats[service_id].idle_calls,
> rte_memory_order_relaxed);
> @@ -888,7 +888,7 @@ lcore_attr_get_service_idle_calls(uint32_t service_id, unsigned int lcore)
> static uint64_t
> lcore_attr_get_service_error_calls(uint32_t service_id, unsigned int lcore)
> {
> - struct core_state *cs = &lcore_states[lcore];
> + struct core_state *cs = RTE_LCORE_VAR_LCORE(lcore, lcore_states);
>
> return rte_atomic_load_explicit(&cs->service_stats[service_id].error_calls,
> rte_memory_order_relaxed);
> --
> 2.36.0
[-- Attachment #2: Type: text/html, Size: 11553 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] service: fix getting service lcore attributes
2024-12-20 14:29 [PATCH] service: fix getting service lcore attributes Piotr Krzewinski
2024-12-20 15:56 ` Van Haaren, Harry
@ 2024-12-23 9:50 ` Mattias Rönnblom
1 sibling, 0 replies; 3+ messages in thread
From: Mattias Rönnblom @ 2024-12-23 9:50 UTC (permalink / raw)
To: Piotr Krzewinski, harry.van.haaren; +Cc: dev, mattias.ronnblom, stable
On 2024-12-20 15:29, Piotr Krzewinski wrote:
> Perf test service_perf_autotest was failing after introduction
> of lcore variables. Fixed getting of idle_ and error_ service
> call statistics.
>> Fixes: b24bbaedbba2 ("service: keep per-lcore state in lcore variable")
> Cc: mattias.ronnblom@ericsson.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Piotr Krzewinski <piotr.krzewinski@ericsson.com>
> ---
> lib/eal/common/rte_service.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c
> index dad3150df9..1821746337 100644
> --- a/lib/eal/common/rte_service.c
> +++ b/lib/eal/common/rte_service.c
> @@ -879,7 +879,7 @@ lcore_attr_get_service_calls(uint32_t service_id, unsigned int lcore)
> static uint64_t
> lcore_attr_get_service_idle_calls(uint32_t service_id, unsigned int lcore)
> {
> - struct core_state *cs = &lcore_states[lcore];
> + struct core_state *cs = RTE_LCORE_VAR_LCORE(lcore, lcore_states);
>
> return rte_atomic_load_explicit(&cs->service_stats[service_id].idle_calls,
> rte_memory_order_relaxed);
> @@ -888,7 +888,7 @@ lcore_attr_get_service_idle_calls(uint32_t service_id, unsigned int lcore)
> static uint64_t
> lcore_attr_get_service_error_calls(uint32_t service_id, unsigned int lcore)
> {
> - struct core_state *cs = &lcore_states[lcore];
> + struct core_state *cs = RTE_LCORE_VAR_LCORE(lcore, lcore_states);
>
> return rte_atomic_load_explicit(&cs->service_stats[service_id].error_calls,
> rte_memory_order_relaxed);
Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-23 9:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-20 14:29 [PATCH] service: fix getting service lcore attributes Piotr Krzewinski
2024-12-20 15:56 ` Van Haaren, Harry
2024-12-23 9:50 ` Mattias Rönnblom
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).