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 44A58A0524; Sat, 4 Jul 2020 16:36:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C8BF1DB8F; Sat, 4 Jul 2020 16:36:05 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id CFEF31DB8A; Sat, 4 Jul 2020 16:36:03 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.144]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 5778B20053; Sat, 4 Jul 2020 14:36:03 +0000 (UTC) Received: from us4-mdac16-4.at1.mdlocal (unknown [10.110.49.155]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 5399F800A4; Sat, 4 Jul 2020 14:36:03 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.7]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id EEB5740060; Sat, 4 Jul 2020 14:36:02 +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 B79FF4C0058; Sat, 4 Jul 2020 14:36:02 +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; Sat, 4 Jul 2020 15:35:58 +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; Sat, 4 Jul 2020 15:35:58 +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 064EZww5008085; Sat, 4 Jul 2020 15:35:58 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 3C75E1616AE; Sat, 4 Jul 2020 15:35:58 +0100 (BST) From: Andrew Rybchenko To: CC: Igor Romanov , , "Harry van Haaren" Date: Sat, 4 Jul 2020 15:35:47 +0100 Message-ID: <1593873347-13686-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25520.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-25520.003 X-MDID: 1593873363-GMHWIjRlnzIZ Subject: [dpdk-dev] [PATCH] service: fix wrong lcore indexes 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