From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A921BA00C5; Mon, 6 Jul 2020 13:06:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CCDE1D929; Mon, 6 Jul 2020 13:06:13 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id D0C3D1D913; Mon, 6 Jul 2020 13:06:11 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.60]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 3921060050; Mon, 6 Jul 2020 11:06:11 +0000 (UTC) Received: from us4-mdac16-68.ut7.mdlocal (unknown [10.7.64.187]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 3707D2009A; Mon, 6 Jul 2020 11:06:11 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.66.32]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id AF4341C0055; Mon, 6 Jul 2020 11:06:10 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 5F8D4B4005F; Mon, 6 Jul 2020 11:06:10 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Jul 2020 12:06:06 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 6 Jul 2020 12:06:06 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 066B662p008187; Mon, 6 Jul 2020 12:06:06 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 956B01616AE; Mon, 6 Jul 2020 12:06:06 +0100 (BST) From: Andrew Rybchenko To: CC: Igor Romanov , , "Harry van Haaren" Date: Mon, 6 Jul 2020 12:05:59 +0100 Message-ID: <1594033561-24563-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1593873347-13686-1-git-send-email-arybchenko@solarflare.com> References: <1593873347-13686-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25524.003 X-TM-AS-Result: No-0.696700-8.000000-10 X-TMASE-MatchedRID: sppTXxFcLW3RhjL796mSwBouoVvF2i0ZNV9S7O+u3KY5yibxcff/slMe 5Blkpry7rdoLblq9S5oO1mVtY5XA0K+/EguYor8cFEUknJ/kEl5q8/xv2Um1avoLR4+zsDTtRcD SKgj6IG2LPZJpE4CXcZdjODtHoG75DvELi71Cdm2r09DnYdZ/103NJGMuEC5G1YCfp67tR6A0Ra GiiwdQJJ0yqLoeoeuHchJw6uJ0wJjaQLtLC8aUqEPBvsmCWGHWUWQ7Bol0IqAY5tvH9Ry2Nw== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.696700-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25524.003 X-MDID: 1594033571-UFutuhoeBo1f Subject: [dpdk-dev] [PATCH v2 1/2] service: fix wrong lcore indices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Igor Romanov The service core list is populated, but not used. Incorrect lcore states are examined for a service. Use the populated list to iterate over service cores. Fixes: e30dd31847d2 ("service: add mechanism for quiescing") Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- lib/librte_eal/common/rte_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 6123a2124d..e2795f857e 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -422,7 +422,7 @@ rte_service_may_be_active(uint32_t id) return -EINVAL; for (i = 0; i < lcore_count; i++) { - if (lcore_states[i].service_active_on_lcore[id]) + if (lcore_states[ids[i]].service_active_on_lcore[id]) return 1; } -- 2.17.1