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 C3789A0564; Tue, 2 Mar 2021 17:23:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64C6B40693; Tue, 2 Mar 2021 17:07:13 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60054.outbound.protection.outlook.com [40.107.6.54]) by mails.dpdk.org (Postfix) with ESMTP id 43E1E40142 for ; Tue, 2 Mar 2021 17:07:12 +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=PIoU5NSgwuI3h0LfU5wzalreU0J0q0uzi8qvhq/77y4=; b=oPmQEBjNMQtqFsbQfVKzrd25eVkId6zgDzbDsCyPRSyNla6c4aLd5+W96mvg0z4McAY1AfsaZZ5GLlv4DVjjYgIY0SNii5Xg3Z539Tm9XlmYCoh+5pUQhGMym5rpPmL1S8yZlXgcLMXK3P/CA+u0baAl/nzhg68QEw0sk/U5k3o= Received: from DU2PR04CA0177.eurprd04.prod.outlook.com (2603:10a6:10:2b0::32) by VI1PR08MB4045.eurprd08.prod.outlook.com (2603:10a6:803:dd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Tue, 2 Mar 2021 16:07:06 +0000 Received: from DB5EUR03FT043.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b0:cafe::8) by DU2PR04CA0177.outlook.office365.com (2603:10a6:10:2b0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Tue, 2 Mar 2021 16:07:06 +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 DB5EUR03FT043.mail.protection.outlook.com (10.152.20.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Tue, 2 Mar 2021 16:07:05 +0000 Received: ("Tessian outbound 9c515f919342:v71"); Tue, 02 Mar 2021 16:07:05 +0000 X-CR-MTA-TID: 64aa7808 Received: from 30e3d0420d32.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 14DFA505-ABF2-42A1-98FD-99D5C074E4C0.1; Tue, 02 Mar 2021 16:07:00 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 30e3d0420d32.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 02 Mar 2021 16:07:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cfThjBljW0RynV8AuFK5QXPjKc8QKTm2epgte1l+46LQ0gl4JCy72GFmwYe84u7k9+Nfjgp/y2QslJEIIvFp7wRiyFVnx08mNUh1yBLgPLs1HHcwYZtCnxdoYNM9hk5KhZXfTAEOZITWN1X1QzLW7DaX9UyiRs+yEoK1LM/60Un1v89oXN6m/racABe0xKb663EqkMC3MSfWu5ZUMoRQmo4ep03x9wQSmo8RZ557tth6Iy4TqBzbBEQ7K4PHhRQijsV8/M25c5j4a644nVMfOqoYpnKIumDcIZ5b/6X0LPesdIkHVOfjpUEe3+qyIALur3buWlOy5IiS9QSYFSftLA== 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=PIoU5NSgwuI3h0LfU5wzalreU0J0q0uzi8qvhq/77y4=; b=duiyex28d6u2qL4EDmaBmctlN9Ubx7bfOIkoy8YmBZfUKRJkmHggMZkYZ0tT0l5n61z2RqSIR9aQuXNBpJGc7lXvOvalteOhijST0XK5ntsp8uTD7GBnCScRBGy/oXdS2eX3rePG3dJTceYVL2279sjGigW9KL/poSXKPVFP99MYd6e3hmhqHOCdPc8zwWzrJ/BH105P/Nk5ss098qIB3pSiqqjYYArKcNU8QBntLPkI131ZxT1g7ZyOw187KemGVWkqejTkelWOUePozyQF32IYLCX6fnFHbixkqfj+gJVL4QSTojeEQD1zkZOv6G8uLpRdLB6k5mT7G678M7hGug== 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=PIoU5NSgwuI3h0LfU5wzalreU0J0q0uzi8qvhq/77y4=; b=oPmQEBjNMQtqFsbQfVKzrd25eVkId6zgDzbDsCyPRSyNla6c4aLd5+W96mvg0z4McAY1AfsaZZ5GLlv4DVjjYgIY0SNii5Xg3Z539Tm9XlmYCoh+5pUQhGMym5rpPmL1S8yZlXgcLMXK3P/CA+u0baAl/nzhg68QEw0sk/U5k3o= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DBBPR08MB4871.eurprd08.prod.outlook.com (2603:10a6:10:da::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Tue, 2 Mar 2021 16:06:52 +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.037; Tue, 2 Mar 2021 16:06:52 +0000 From: Honnappa Nagarahalli To: Stephen Hemminger CC: "dev@dpdk.org" , Ruifeng Wang , "Feifei Wang (Arm Technology China)" , nd , nd Thread-Topic: [dpdk-dev] [RFC 0/5] Use correct memory ordering in eal functions Thread-Index: AQHXDrneekTSF8tzDkSZI0iGpdyQLqpw3k7A Date: Tue, 2 Mar 2021 16:06:52 +0000 Message-ID: References: <20210224212018.17576-1-honnappa.nagarahalli@arm.com> <20210301084153.50b1c397@hermes.local> In-Reply-To: <20210301084153.50b1c397@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: DDA256AB26DAAA4DB986DDF81946816B.0 x-checkrecipientchecked: true Authentication-Results-Original: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; 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: bb9dd895-5e2b-4ee0-6730-08d8dd953960 x-ms-traffictypediagnostic: DBBPR08MB4871:|VI1PR08MB4045: 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: AX8xChK9+ZY5WkzLWo0hgsln8vQs7t1QiwBWiT/VK8bCE31mK5CGJMwUSQ1YPK7s5fBd1c15zKWJy00fz9TuT3E0CSZWtbSBa7azRpy7ThY5fwFc6q5fGLIIdLb3McfTSqbMal6+TSAkxzAtev/5JMTEaGmAEw7IvavUD1TBzI1UDyWrhVxtahyA9HKRlaFsK0u9WmO2uk+N2OVy6sdEur186GyAwtVwUxo9I1XL1d7l5qmM+9givBvQMunPg7P6DWvDw5SBPjC9k6hfFlScqBXiEhzlNQxPljLj1TRGYzDnyIG4aKgqc1FuhiHzvjV8AW/JyqNHSswSQ8InLesK8IpJpZd9q4ha45DjLRo0nF6UEqTIJXh1S1nAKsTmNDnMGfy23I+SEHfu5PZRdf8LD1htdRmRhfdmDRU6nnc9fo+ifkwzjz/5UKvUewheqEZQLHSAeNXbD5baoPBPZEEoc7F94s2SQTXHbk827BZJYfWwHOSwhIEfXsIMfmHEJHbzCzofeBj3usoKt9RthCLLww== 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)(346002)(136003)(376002)(39860400002)(396003)(366004)(316002)(86362001)(8936002)(33656002)(6916009)(54906003)(4326008)(55016002)(83380400001)(8676002)(71200400001)(7696005)(478600001)(6506007)(66946007)(66476007)(52536014)(64756008)(66446008)(5660300002)(76116006)(26005)(186003)(2906002)(66556008)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?th1SWBPoBbIak4UObMzpTq3yymzF8fvaGsDvzAF6ImZE6hZ7Vl5/Yg/2mQt+?= =?us-ascii?Q?GTkJA79CaWmrO1AsxTzujDy9Eanf7tI/F5ElLvzN8egw8joyVU/Ny1KEsNnP?= =?us-ascii?Q?mMWW+BoNiq0dwNSc4IAr1wLfNqJqS11Hooi4Oj/9zDMRI34Z3T4DB6W+zdx7?= =?us-ascii?Q?BJITe/sSNxj0DvDktFC7NCVYBAtPJdrcucNR9iPVPjxwL2r6N2SN3pggQ9p4?= =?us-ascii?Q?sbD+L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?= =?us-ascii?Q?1wxRBumA8hoT0z2UYuyOC+Pgawg2QIPEi02BXST7kePYRALmhkSIP44/fxMO?= =?us-ascii?Q?65DSSe7pr8eJMW6Nsj13OykOgV8wmnigDojj6ppTiggrbAhV2HVdfdPn3T2k?= =?us-ascii?Q?HfnRPUusopsmU/rDb8N1a5TO4eo2m7n83K1zaOK2pECNuzAsDvWLQsGaIMth?= =?us-ascii?Q?H5noUP1Ka169Byi9mC+ZlJHZ?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4871 Original-Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none; networkplumber.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 75980eab-5938-4adb-edb4-08d8dd953178 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AnlyGqDcKUrCeMlcZ8LfCdWMjRjQRUwi9tHcsjy12fkX5lC/crdhgE9oy2j3z6mrMeNW8ZFF+XNZt6eZlblb/s1j0mwM+Z9mCr6d3mHzXo5ZEvy4karPhlenGsEpVmTEnqukG5GaSCAWdQVNfyiuvfR7JZsUv3p9i9pdpd4fEwqL2fcluA+SV3p0RlG73SvYDxCnWXvTqzF8u3jWUGYn9UhHfMRvvATrPIYZ0Dj8fG8eAdZeZkhGcVl4EePbMg2qKmgTtLpOj7tf/uTUwHnpTdChIvWmfQqxWbZdYXx9qxJy1NLs4krujH32CNk2TZhB+7K0Gn5MkMAg24Cz2sxmhXYKvkBH8jsn3df8K+EcHx8qEF7/G/cp0c4wJnw3j4whSv982JRkRA+P00QzXSQv6CIatc5tekvaSA/7FxYQNqOwTH45xh/FsO0qKnRMcItUkfYlu3UCRo2v5xaDQ1yM6qFt5rKd6sSdSnSnWZfPvPSuxT7EzZpumk8bwYcvIEN6GtNUwFtoa+zPsYJdhIdrttNJWwS5cf+wRwB8MwNE4oJagKFKf/u2WGK7YJpCd/2PuSJcxXKjnhfLAAnAc7SN4G7uL7W9/U13i5Mgl9q1kJP5aRDs0Q+BkpU03aYzHCvgn466E1NCYEMryjoRHWCTjg== 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)(39860400002)(376002)(396003)(136003)(346002)(36840700001)(46966006)(82310400003)(356005)(4326008)(82740400003)(70206006)(7696005)(55016002)(81166007)(70586007)(8676002)(54906003)(6862004)(33656002)(6506007)(316002)(83380400001)(2906002)(8936002)(478600001)(186003)(47076005)(52536014)(86362001)(9686003)(5660300002)(336012)(36860700001)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2021 16:07:05.5340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb9dd895-5e2b-4ee0-6730-08d8dd953960 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: DB5EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4045 Subject: Re: [dpdk-dev] [RFC 0/5] Use correct memory ordering in eal functions 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" >=20 > > rte_eal_remote_launch and rte_eal_wait_lcore need to provide correct > > memory ordering to address the data communication from main core to > > worker core and vice versa. > > > > There are 2 use cases: > > 1) All the store operations (meant for worker) by main core should be > > visible to worker core before the worker core runs the assigned > > function > > > > 2) All the store operations by the worker core should be visible to > > the main core after rte_eal_wait_lcore returns. > > > > For the data that needs to be communicated to the worker after the > > rte_eal_remote_launch returns, load-acquire and store-release > > semantics should be used (just like any other writer-reader use case). > > > > For the main to worker communication, the pointer to function to > > execute is used as the guard variable. Hence, resetting of the > > function pointer is important. > > > > For the worker to main communication, the existing code uses the lcore > > state as the guard variable. However, it looks like the FINISHED state > > is not really required. Hence the FINISHED state is removed before > > using the state as the guard variable. I would like some feedback on > > why the FINISHED state is required. I have not paid attention to what > > it means for backward compatibility. > > If it is decided to remove this state, documentation changes are > > required. > > >=20 >=20 > Most likely all use of volatile in DPDK is suspect. > Perhaps we should re-enable the "volatile considered harmful" warning in > checkpatch Agree.