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 6CED3A00C5 for ; Tue, 7 Jul 2020 12:45:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2AF821DDE4; Tue, 7 Jul 2020 12:45:36 +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 2F6221DDD6; Tue, 7 Jul 2020 12:45:33 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.137]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id C0C8B2006C; Tue, 7 Jul 2020 10:45:32 +0000 (UTC) Received: from us4-mdac16-73.at1.mdlocal (unknown [10.110.50.191]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id BFA016009B; Tue, 7 Jul 2020 10:45:32 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.49.106]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 5CBA922004D; Tue, 7 Jul 2020 10:45:32 +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 251AEB40066; Tue, 7 Jul 2020 10:45:32 +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; Tue, 7 Jul 2020 11:45:28 +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; Tue, 7 Jul 2020 11:45:28 +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 067AjSwo013625; Tue, 7 Jul 2020 11:45:28 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 3F3FC1616A4; Tue, 7 Jul 2020 11:45:28 +0100 (BST) From: Andrew Rybchenko To: CC: Igor Romanov , , "Harry van Haaren" Date: Tue, 7 Jul 2020 11:45:24 +0100 Message-ID: <1594118726-8421-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-25526.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-25526.003 X-MDID: 1594118732-XW7QSaWHKQHT Subject: [dpdk-stable] [PATCH v3 1/2] service: fix wrong lcore indices X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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