From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0149545F20; Mon, 23 Dec 2024 10:50:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7CAB4068E; Mon, 23 Dec 2024 10:50:20 +0100 (CET) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 0F1E1402DC; Mon, 23 Dec 2024 10:50:20 +0100 (CET) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id A4B2368C; Mon, 23 Dec 2024 10:50:19 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 980EB635; Mon, 23 Dec 2024 10:50:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,AWL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=4.0.0 X-Spam-Score: -1.2 Received: from [192.168.1.85] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id EB40055A; Mon, 23 Dec 2024 10:50:17 +0100 (CET) Message-ID: <4eea8fbc-9c78-42a2-8b9a-fd8c7cc2b3fa@lysator.liu.se> Date: Mon, 23 Dec 2024 10:50:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] service: fix getting service lcore attributes To: Piotr Krzewinski , harry.van.haaren@intel.com Cc: dev@dpdk.org, mattias.ronnblom@ericsson.com, stable@dpdk.org References: <20241220142938.1300646-1-piotr.krzewinski@ericsson.com> Content-Language: en-US From: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= In-Reply-To: <20241220142938.1300646-1-piotr.krzewinski@ericsson.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 > --- > 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 Thanks!