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 675A9A034F; Fri, 26 Feb 2021 00:33:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0441D40A4B; Fri, 26 Feb 2021 00:33:56 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2057.outbound.protection.outlook.com [40.107.22.57]) by mails.dpdk.org (Postfix) with ESMTP id 22FB9407FF for ; Fri, 26 Feb 2021 00:33:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/x0zxJIQ99oao/3YqXg5/t045537/bd8r1vHlGF2cbM=; b=x938EAHU19ftaTnaMgjoZ0TCpdw1uxcgeUbjL5PK3EnhqunfKvmVRJ84k7AUADxEY6bV1ug8shYuBZCcXNvoI5w5KJFpPeMIMokKrCBgRIW0kGwKZkAeTfs9ZA9GuJTVji6FZmPFTgDvw4h2ufBskAhVhSL403Du/SbYgqTGSiE= Received: from DU2PR04CA0169.eurprd04.prod.outlook.com (2603:10a6:10:2b0::24) by DB6PR0801MB2120.eurprd08.prod.outlook.com (2603:10a6:4:3c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.32; Thu, 25 Feb 2021 23:33:38 +0000 Received: from DB5EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b0:cafe::91) by DU2PR04CA0169.outlook.office365.com (2603:10a6:10:2b0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Thu, 25 Feb 2021 23:33:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT009.mail.protection.outlook.com (10.152.20.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Thu, 25 Feb 2021 23:33:38 +0000 Received: ("Tessian outbound 1ad67edf7b2b:v71"); Thu, 25 Feb 2021 23:33:38 +0000 X-CR-MTA-TID: 64aa7808 Received: from 90959ebd369b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 604EFF40-D4E7-42A4-A90F-5B19CAC713EF.1; Thu, 25 Feb 2021 23:33:33 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 90959ebd369b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 25 Feb 2021 23:33:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=msUzPOYExfZa3Iz3ZXukKF4vLxgSueFFa2cb7D/aTVJUCfP/BqMbCXGkBsd/AXviwor1Tl374QGKjR+Fe6hdjDj82zsxvpAAV90bo1PEbuqEzUqXiFwjZTsDYHzIAABsvtksHH9vb4kJWfQ+GO3nkdSfhuhmO3BqqOdXSrzsWQljj8ED6utGsXze+37pBNVBF6Kj2EO4iSxLbZR2dLTRRT5+580s78fl6eTEukIf3/EkulMmpAZEipGOMF3zMi8y+N/bW7hKyUrvvDeN2C1DyexK8CTJABkJj/U/sL76/YAJoNEQpRlbdKAo7jsFgu5WGjWCKw207VLj2JOG6eAFFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/x0zxJIQ99oao/3YqXg5/t045537/bd8r1vHlGF2cbM=; b=F7HQIMrAB935gl1yOZZ6OeDJurF5oacWuqGSL49cZeMY7fjdgKpiTidDKeVy/k6ZX9cPWXjBWLZL9iK3mdsvTiAP/ElNg9hmiFIOsKcAnJMqt2/OlKATiDBRirzyGzFJ/f66H/rCZkOJk6XSaWy1qqA0uVtejnk/ZmGGtlig7qlU97+9Lg7voPspcjRjYNPa6YBzTdXeAK/9w76pRbgRyyJWu7T7vhN7ojgavcQc0ZYp9ee3zjQ2C+uMzkd/AKGixKYofo+ws3kdASGujejihaIfvVi2gCRlG+IHUGfeUIk+7xKUL/OBI9BW/lHgoLXweTO8ePBZG7Bac2MvYmVgIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/x0zxJIQ99oao/3YqXg5/t045537/bd8r1vHlGF2cbM=; b=x938EAHU19ftaTnaMgjoZ0TCpdw1uxcgeUbjL5PK3EnhqunfKvmVRJ84k7AUADxEY6bV1ug8shYuBZCcXNvoI5w5KJFpPeMIMokKrCBgRIW0kGwKZkAeTfs9ZA9GuJTVji6FZmPFTgDvw4h2ufBskAhVhSL403Du/SbYgqTGSiE= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DBBPR08MB6233.eurprd08.prod.outlook.com (2603:10a6:10:204::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Thu, 25 Feb 2021 23:33:21 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::cbb:4373:1761:19b1]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::cbb:4373:1761:19b1%7]) with mapi id 15.20.3868.033; Thu, 25 Feb 2021 23:33:21 +0000 From: Honnappa Nagarahalli To: Feifei Wang , "hemant.agrawal@nxp.com" , "Nipun.gupta@nxp.com" , "jerinj@marvell.com" , "harry.van.haaren@intel.com" , "bruce.richardson@intel.com" , "dmitry.kozliuk@gmail.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "pallavi.kadam@intel.com" , "thomas@monjalon.net" , "david.marchand@redhat.com" , "konstantin.ananyev@intel.com" CC: "dev@dpdk.org" , Ruifeng Wang , nd , nd Thread-Topic: [RFC 3/5] eal: lcore state FINISHED is not required Thread-Index: AQHXCvL6fsXhExvHBE+iVSlZJam1PKpofqqwgAAAyECAAGZ6YA== Date: Thu, 25 Feb 2021 23:33:21 +0000 Message-ID: References: <20210224212018.17576-1-honnappa.nagarahalli@arm.com> <20210224212018.17576-4-honnappa.nagarahalli@arm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 9C549AD2EA08024192D66DBFF78F7216.0 x-checkrecipientchecked: true Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [70.113.13.105] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b0e88623-bd6f-4de9-e0a8-08d8d9e5c726 x-ms-traffictypediagnostic: DBBPR08MB6233:|DB6PR0801MB2120: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Qzy7QUmtPy2RQRkR/aEJIVTMYGiPErqjpP80hMHUK/wHmS5hUxCXkOEUfgKF8ojOFCh/XPpibd2HpyJRgd+VfnCTGIB7ivbZl1opEB7m6o/ARYfgkdrpG3fTOLC68z/ZtNg+h6Q+sQxB79kkuB0DS4XJiYBKPNrOxh7W63Ej4s9AzkgLsnkhnoLTgXU4fkLtVd5eV6k+O+SpgwjU+KF1/I2jbiOBPXepGwf3aDc95UiwMusfXKnT+ZnC0r0IBYOQgzcVkNE6jYvHUbaRptN/qZqMQCf6RPc2y6f4cQI6SzaPDdRUyno+q3uKelRHbGtz/RjwMwNTZ48JypwFyC1nN3IIm3neClHwM94BCUFfXVr+Ja7I6IKTbK/WdAo7yNqpZcStjzfKHvZ2sBe+Ia7aezghnOUGw1H9S8XVQZDnmbyVBKgnzc4XsnJGdYxIdECL/vpH8dGXPx9blb75cU18S+dJW3xxSqske5k4OmHWxcLIWq1XizuxR4jagrcCPiokzuUHdpWR0INODY+KtYrOjT2VVLXmBsvcb5/LbEFZSLZgtMOxMXFNewevCnMU6vzP X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(376002)(346002)(396003)(39860400002)(2906002)(9686003)(4326008)(83380400001)(55016002)(316002)(54906003)(66476007)(26005)(52536014)(66446008)(76116006)(7696005)(66556008)(186003)(86362001)(110136005)(71200400001)(921005)(64756008)(33656002)(8936002)(8676002)(5660300002)(6506007)(478600001)(7416002)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?C9xZeQBsefB4Npica4DuEc1K7aPmXSMjCikRqGrxEZFrihpDPrOox68/hl9c?= =?us-ascii?Q?7IZd3yCMvTj28ZiP8Cdsv4XbHm2sN9CEnC90THUWKu2xdkwhw0mpyYG6NH/Y?= =?us-ascii?Q?cEVG9VaK4vwI/mluZQf6rmr/KaKue/5hcA1etMMsSbtGwNgIIXVi2kWFm/lK?= =?us-ascii?Q?I484aPvhQhxg7wEqQ169Z+L+9orpWtrQ3QYCVhF0GFYyihz/4WWBRkAkC6vi?= =?us-ascii?Q?pZxxiFXZsa2LTS46f/WL7XujTjPQtBIvKxP4RVg21kCU5m3q8tEemGqI1nDs?= =?us-ascii?Q?TK4+p6Yv5LmVHZvz8Vxw9Ael51QzxfycGL8MKv0Nz1mc5yue7IDCsvKnFhhw?= =?us-ascii?Q?0AJFfNZQipDP9tBOyzImwtGBHm8aFwTRRhydxbVKATWQ9Wg18bpZEVgDjqGK?= =?us-ascii?Q?H5y1SafCsoluYINgULA0BMNLcB/fGt2p3hplQU6Z/lZda5dm3VZXZzhA7Pj7?= =?us-ascii?Q?fwz2tJGVhmrJTStzaHFCWXvUJFL84xQbF3dXjkKee2pwDtcShple67UR3LfF?= =?us-ascii?Q?2Aja/X/ntemB5m38a+bNgvWh4gMrxJMwvPQGqkIRIzQJKz7BrklHcfnBgpHr?= =?us-ascii?Q?FqGcgKqbR0C6XGvE+x09naBjwZUCSNt0pF1EQsK/8hdGAKD2I+m4CqJ+Wyt/?= =?us-ascii?Q?POxhGmauc6I4alyvBo9f+j3WbgxdfifIBvCJ3N12wTxUmwgzks+SSxWtdMTg?= =?us-ascii?Q?4tc2IkKtyoe0FRwRzCvQnRtMD9zGtrLUipaATnUfH5RteGKfuDS9toY01jgx?= =?us-ascii?Q?6+VwbQOXRp1lvav6sG8njXiESjsNQYCZJlp1TwDibW5E8c3xWcKyvXw0YGcU?= =?us-ascii?Q?X0omJaH2B7xeF4Yhydpi6Tex8itcVlEfYe9L6YntXoaD+hdEW0K+dLS0o+mi?= =?us-ascii?Q?Mc4gsfgZ4zMgTQPibFDhvMV0/qWnulyHF7Hd9ooWQFO5TSY9ZLmhZCG+T8z5?= =?us-ascii?Q?cVd8Y0blhfql/e5KsbUGRZu0noJDlqJQHfHSgTLPyEFtpO44bf3UjRQTax/r?= =?us-ascii?Q?hr+YqlKSX7lCpsb7OdKdYDhnyxzGAYY2jkJ+5i0oTcJqNj48pMnp4GT38o7Q?= =?us-ascii?Q?n7u28lRBVz8Kcj1Oc+jZPIKRO/9gTNqxyYNI8+XMSIqLQ797avE/UqW5mfZh?= =?us-ascii?Q?icClC2/g6ZbtGAoAUvNceZyqgejs9jlgFk2DI1yJ8XiwRcr5C0XyK88w07Ni?= =?us-ascii?Q?NlNFPRrdLIDhemp/usMPtZZsfFoV00PHnTghPngkqozMyxShjpT/ID8ALTdJ?= =?us-ascii?Q?w3Apv51zy5v6fpEWrQHU/AL6P0m5ITCz3V0HJNpxYE/xACTbqQhIwUqCmIHh?= =?us-ascii?Q?kQkCi/TgSmy8EUbUDJn3CltC?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6233 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 957671d2-d11e-4b09-7cd4-08d8d9e5bd0b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Sx2cdvFuaU2MseJntbvaGql7M7bfUsQ165DTqGb+1X/Vkq7OMMIcjAQ1sqb5Ea66cTj+vSTiR42GraiSsk1gZZ9roFRl7Gjc9TK50tZqpo7qzJgVwmmfZWwKvj1pfkT6/87b2QIo9A6ijtEV85X0347jjwucsUt/zJ+4AwiUbLS0etANxQ6D6RzRVwmCtrMGVJPvDcKmm7OsxxX4+PmBa/BgbePiehOOpO7f4pIIX+p4G3cQ5gJY9Gmt2lk60ZPbiDrG2mvYGVd4cSpGQFtI4op4dsOEJw7GRE7h+uS7h3hzpnFwW+B2mf5Iftq3q4kwIEggEYuY8lz7sbEzoCEmCfi7594oBKeTLrkfV0b7EHxUgjeBeoVpL5wJnxoKd3mX6iZKplKJ7AT76KFDJl7idpNbkLJB2Cre9I6EZLlGK4tm/TpFIGdPiUK9aVZrqcAxD/KCYSGWwl6BJ9ChVa0EwpWi+VrL0Ktdq9lCl0RSZBFlC8vAdmNdIqH29hcP/ntTFguJieaUB5fROAeN5HousS2H6OS7/qpF6iIM+oF6oZ3Ecn7FWwjl+e2zpdxY4pMWssgG0I83Hig436oQiVvrbkWrrAC5eakmyOXFXIDUk+WWq1cEBIqkSY5oAEGkbvi4jw3dvPLUomGvH1PEIHH8fdSa82tEkrqK7g/QOqYkre0= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(396003)(36840700001)(46966006)(81166007)(54906003)(8936002)(33656002)(86362001)(83380400001)(316002)(52536014)(9686003)(55016002)(7696005)(921005)(36860700001)(70586007)(356005)(6506007)(478600001)(186003)(26005)(5660300002)(82740400003)(110136005)(4326008)(82310400003)(70206006)(47076005)(2906002)(8676002)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2021 23:33:38.4797 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0e88623-bd6f-4de9-e0a8-08d8d9e5c726 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2120 Subject: Re: [dpdk-dev] [RFC 3/5] eal: lcore state FINISHED is not required 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 Sender: "dev" +Thomas, David, Konstantin for input > > Subject: [RFC 3/5] eal: lcore state FINISHED is not required > > > > FINISHED state seems to be used to indicate that the worker's update > > of the 'state' is not visible to other threads. There seems to be no > > requirement to have such a state. >=20 > I am not sure "FINISHED" is necessary to be removed, and I propose some o= f my > profiles for discussion. > There are three states for lcore now: > "WAIT": indicate lcore can start working > "RUNNING": indicate lcore is working > "FINISHED": indicate lcore has finished its working and wait to be reset If you look at the definitions of "WAIT" and "FINISHED" states, they look s= imilar, except for "wait to be reset" in "FINISHED" state . The code really= does not do anything to reset the lcore. It just changes the state to "WAI= T". >=20 > From the description above, we can find "FINISHED" is different from "WAI= T", it > can shows that lcore has done the work and finished it. Thus, if we remov= e > "FINISHED", maybe we will not know whether the lcore finishes its work or= just > doesn't start, because this two state has the same tag "WAIT". Looking at "eal_thread_loop", the worker thread sets the state to "RUNNING"= before sending the ack back to main core. After that it is guaranteed that= the worker will run the assigned function. Only case where it will not run= the assigned function is when the 'write' syscall fails, in which case it = results in a panic. >=20 > Furthermore, consider such a scenario: > Core 1 need to monitor Core 2 state, if Core 2 finishes one task, Core 1 = can start > its working. > However, if there is only one tag "WAIT", Core 1 maybe start its work a= t the > wrong time, when Core 2 still does not start its task at state "WAIT". > This is just my guess, and at present, there is no similar application sc= enario in > dpdk. To be able to do this effectively, core 1 needs to observe the state change= from WAIT->RUNNING->FINISHED. This requires that core 1 should be calling = rte_eal_remote_launch and rte_eal_wait_lcore functions. It is not possible = to observe this state transition from a 3rd core (for ex: a worker might go= from RUNNING->FINISHED->WAIT->RUNNING which a 3rd core might not be able t= o observe). >=20 > On the other hand, if we decide to remove "FINISHED", please consider the > following files: > 1. lib/librte_eal/linux/eal_thread.c: line 31 > lib/librte_eal/windows/eal_thread.c: line 22 > lib/librte_eal/freebsd/eal_thread.c: line 31 I have looked at these lines, they do not capture "why" FINISHED state is r= equired. 2. > lib/librte_eal/include/rte_launch.h: line 24, 44, 121, 123, 131 3. exampl= es/l2fwd- > keepalive/main.c: line 510 > rte_eal_wait_lcore(id_core) can be removed. Because the core state has be= en > checked as "WAIT", this is a redundant operation >=20 > Best Regards > Feifei >=20 > > > > Signed-off-by: Honnappa Nagarahalli > > Reviewed-by: Ola Liljedahl > > --- > > drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 2 +- > > drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +- > > drivers/event/sw/sw_evdev_selftest.c | 4 ++-- > > examples/l2fwd-keepalive/main.c | 2 +- > > lib/librte_eal/common/eal_common_launch.c | 7 ++----- > > lib/librte_eal/freebsd/eal_thread.c | 2 +- > > lib/librte_eal/linux/eal_thread.c | 8 +------- > > lib/librte_eal/windows/eal_thread.c | 8 +------- > > 8 files changed, 10 insertions(+), 25 deletions(-) > > > > diff --git a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c > > b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c > > index cd7311a94..bbbd20951 100644 > > --- a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c > > +++ b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c > > @@ -468,7 +468,7 @@ wait_workers_to_join(int lcore, const > > rte_atomic32_t > > *count) RTE_SET_USED(count); > > > > print_cycles =3D cycles =3D rte_get_timer_cycles(); -while > > (rte_eal_get_lcore_state(lcore) !=3D FINISHED) { > > +while (rte_eal_get_lcore_state(lcore) !=3D WAIT) { > > uint64_t new_cycles =3D rte_get_timer_cycles(); > > > > if (new_cycles - print_cycles > rte_get_timer_hz()) { diff --git > > a/drivers/event/octeontx/ssovf_evdev_selftest.c > > b/drivers/event/octeontx/ssovf_evdev_selftest.c > > index 528f99dd8..d7b0d2211 100644 > > --- a/drivers/event/octeontx/ssovf_evdev_selftest.c > > +++ b/drivers/event/octeontx/ssovf_evdev_selftest.c > > @@ -579,7 +579,7 @@ wait_workers_to_join(int lcore, const > > rte_atomic32_t > > *count) RTE_SET_USED(count); > > > > print_cycles =3D cycles =3D rte_get_timer_cycles(); -while > > (rte_eal_get_lcore_state(lcore) !=3D FINISHED) { > > +while (rte_eal_get_lcore_state(lcore) !=3D WAIT) { > > uint64_t new_cycles =3D rte_get_timer_cycles(); > > > > if (new_cycles - print_cycles > rte_get_timer_hz()) { diff --git > > a/drivers/event/sw/sw_evdev_selftest.c > > b/drivers/event/sw/sw_evdev_selftest.c > > index e4bfb3a0f..7847a8645 100644 > > --- a/drivers/event/sw/sw_evdev_selftest.c > > +++ b/drivers/event/sw/sw_evdev_selftest.c > > @@ -3138,8 +3138,8 @@ worker_loopback(struct test *t, uint8_t > > disable_implicit_release) > > rte_eal_remote_launch(worker_loopback_worker_fn, t, w_lcore); > > > > print_cycles =3D cycles =3D rte_get_timer_cycles(); -while > > (rte_eal_get_lcore_state(p_lcore) !=3D FINISHED || > > -rte_eal_get_lcore_state(w_lcore) !=3D FINISHED) { > > +while (rte_eal_get_lcore_state(p_lcore) !=3D WAIT || > > +rte_eal_get_lcore_state(w_lcore) !=3D WAIT) { > > > > rte_service_run_iter_on_app_lcore(t->service_id, 1); > > > > diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd- > > keepalive/main.c index e4c2b2793..dd777c46a 100644 > > --- a/examples/l2fwd-keepalive/main.c > > +++ b/examples/l2fwd-keepalive/main.c > > @@ -506,7 +506,7 @@ dead_core(__rte_unused void *ptr_data, const int > > id_core) if (terminate_signal_received) return; printf("Dead core > > %i - restarting..\n", id_core); -if (rte_eal_get_lcore_state(id_core) > > =3D=3D FINISHED) { > > +if (rte_eal_get_lcore_state(id_core) =3D=3D WAIT) { > > rte_eal_wait_lcore(id_core); > > rte_eal_remote_launch(l2fwd_launch_one_lcore, NULL, id_core); } else > > { diff --git a/lib/librte_eal/common/eal_common_launch.c > > b/lib/librte_eal/common/eal_common_launch.c > > index 34f854ad8..78fd94026 100644 > > --- a/lib/librte_eal/common/eal_common_launch.c > > +++ b/lib/librte_eal/common/eal_common_launch.c > > @@ -26,14 +26,11 @@ rte_eal_wait_lcore(unsigned worker_id) if > > (lcore_config[worker_id].state =3D=3D WAIT) return 0; > > > > -while (lcore_config[worker_id].state !=3D WAIT && > > - lcore_config[worker_id].state !=3D FINISHED) > > +while (lcore_config[worker_id].state !=3D WAIT) > > rte_pause(); > > > > rte_rmb(); > > > > -/* we are in finished state, go to wait state */ - > > lcore_config[worker_id].state =3D WAIT; return > > lcore_config[worker_id].ret; } > > > > @@ -62,7 +59,7 @@ rte_eal_mp_remote_launch(int (*f)(void *), void > > *arg, > > > > if (call_main =3D=3D CALL_MAIN) { > > lcore_config[main_lcore].ret =3D f(arg); > > -lcore_config[main_lcore].state =3D FINISHED; > > +lcore_config[main_lcore].state =3D WAIT; > > } > > > > return 0; > > diff --git a/lib/librte_eal/freebsd/eal_thread.c > > b/lib/librte_eal/freebsd/eal_thread.c > > index 17b8f3996..6d6f1e2fd 100644 > > --- a/lib/librte_eal/freebsd/eal_thread.c > > +++ b/lib/librte_eal/freebsd/eal_thread.c > > @@ -140,7 +140,7 @@ eal_thread_loop(__rte_unused void *arg) > > lcore_config[lcore_id].f =3D NULL; lcore_config[lcore_id].arg =3D NULL= ; > > rte_wmb(); -lcore_config[lcore_id].state =3D FINISHED; > > +lcore_config[lcore_id].state =3D WAIT; > > } > > > > /* never reached */ > > diff --git a/lib/librte_eal/linux/eal_thread.c > > b/lib/librte_eal/linux/eal_thread.c > > index a0a009104..7b9463df3 100644 > > --- a/lib/librte_eal/linux/eal_thread.c > > +++ b/lib/librte_eal/linux/eal_thread.c > > @@ -141,13 +141,7 @@ eal_thread_loop(__rte_unused void *arg) > > lcore_config[lcore_id].arg =3D NULL; rte_wmb(); > > > > -/* when a service core returns, it should go directly to WAIT > > - * state, because the application will not lcore_wait() for it. > > - */ > > -if (lcore_config[lcore_id].core_role =3D=3D ROLE_SERVICE) - > > lcore_config[lcore_id].state =3D WAIT; -else > > -lcore_config[lcore_id].state =3D FINISHED; > > +lcore_config[lcore_id].state =3D WAIT; > > } > > > > /* never reached */ > > diff --git a/lib/librte_eal/windows/eal_thread.c > > b/lib/librte_eal/windows/eal_thread.c > > index 7a9277c51..35d059a30 100644 > > --- a/lib/librte_eal/windows/eal_thread.c > > +++ b/lib/librte_eal/windows/eal_thread.c > > @@ -125,13 +125,7 @@ eal_thread_loop(void *arg __rte_unused) > > lcore_config[lcore_id].arg =3D NULL; rte_wmb(); > > > > -/* when a service core returns, it should go directly to WAIT > > - * state, because the application will not lcore_wait() for it. > > - */ > > -if (lcore_config[lcore_id].core_role =3D=3D ROLE_SERVICE) - > > lcore_config[lcore_id].state =3D WAIT; -else > > -lcore_config[lcore_id].state =3D FINISHED; > > +lcore_config[lcore_id].state =3D WAIT; > > } > > } > > > > -- > > 2.17.1 > >