DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mattias Rönnblom" <hofors@lysator.liu.se>
To: Piotr Krzewinski <piotr.krzewinski@ericsson.com>,
	harry.van.haaren@intel.com
Cc: dev@dpdk.org, mattias.ronnblom@ericsson.com, stable@dpdk.org
Subject: Re: [PATCH] service: fix getting service lcore attributes
Date: Mon, 23 Dec 2024 10:50:17 +0100	[thread overview]
Message-ID: <4eea8fbc-9c78-42a2-8b9a-fd8c7cc2b3fa@lysator.liu.se> (raw)
In-Reply-To: <20241220142938.1300646-1-piotr.krzewinski@ericsson.com>

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!


      parent reply	other threads:[~2024-12-23  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 14:29 Piotr Krzewinski
2024-12-20 15:56 ` Van Haaren, Harry
2024-12-23  9:50 ` Mattias Rönnblom [this message]

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=4eea8fbc-9c78-42a2-8b9a-fd8c7cc2b3fa@lysator.liu.se \
    --to=hofors@lysator.liu.se \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=piotr.krzewinski@ericsson.com \
    --cc=stable@dpdk.org \
    /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).