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 EDB3A42D46; Sun, 25 Jun 2023 09:55:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF77440ED8; Sun, 25 Jun 2023 09:55:43 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2044.outbound.protection.outlook.com [40.107.21.44]) by mails.dpdk.org (Postfix) with ESMTP id 1A30A40A7F for ; Sun, 25 Jun 2023 09:55:42 +0200 (CEST) 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=/1xRbl0J+Wf0xLXr9vyrhLCt5JNrAM9KutvoO9JOFzE=; b=oypqzCeQXaQoWWjEm0u1O7VQatjAUomMjsorvRuQ9xo4tOlx0rvWobNdLTWDVfc89HJOLthlSMd4Qs8IFXKeEjUz/DnlxUh33ub0b5aU4rdswkMg25Ba5r4z7kYol9/EKUBkphU/hNe2zp0eMMmz0de9tQWIMqnJCJeGjDiemaY= Received: from AM0PR10CA0050.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::30) by PAVPR08MB9040.eurprd08.prod.outlook.com (2603:10a6:102:32d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Sun, 25 Jun 2023 07:55:39 +0000 Received: from AM7EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:150:cafe::fd) by AM0PR10CA0050.outlook.office365.com (2603:10a6:20b:150::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.32 via Frontend Transport; Sun, 25 Jun 2023 07:55:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT054.mail.protection.outlook.com (100.127.140.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.11 via Frontend Transport; Sun, 25 Jun 2023 07:55:38 +0000 Received: ("Tessian outbound b11b8bb4dfe8:v142"); Sun, 25 Jun 2023 07:55:38 +0000 X-CR-MTA-TID: 64aa7808 Received: from b637b3f5b348.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 80DDB5F1-6BEB-4816-9582-2E9C14E861E1.1; Sun, 25 Jun 2023 07:55:28 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b637b3f5b348.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 25 Jun 2023 07:55:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M4si6jZeYTjmlOPprKOXq/9APhLp0t+TTOqK3BQFWV6a5Eh1/hDrh5WvuDXgR+94mDvyqi8X1tvweORAFKEPsYZ0fGX24x7GoPOrjChBpGCPi449eKf03emcpEyilQkiSBELkPJercNH+/ELVPVX/jTLexsc3cRN02pcFx6pw+zFOGxp4UxqXvKiVzD2eSobInF6znR1+gBcdWI5nBiATA71a1MEktSNaFGgoJ9bC1OmHSRyiRj42XUHUp83/+8EzmuiKT8SXI2+q8OgdAqxcUebeREk6S1LLbCwj08eHae6xDypZwTKO4wzoDjx51zML5djxRU2gbkwFREiC+PAzA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/1xRbl0J+Wf0xLXr9vyrhLCt5JNrAM9KutvoO9JOFzE=; b=bdtrSrWvC9D+VqJydtz3bICXkCEiVngHC2LZVwsiIk1GBWDo2fG+1ZxUdTFJLpgVFjdCEnZobnw1chLQbvgaL0U2JUspAAX1e+1MqiC3irIG5of3w0LvUm2WOac7f7SyXSZoYx7sGFtWToHcqH4q01D4C/+e68kYdY0JeCa4ULO8AfYeJGxXuFB9zDVhJq/vC62D23WOzA86Ox1LnrW2iR+OUrqDP0uom94mzzoekoBtLIdZyQ08eeM+9qMPoV0td+CwFPOzt5tOAqi/5TKfpJ1PpIpVFoAfXAoNdJV+bZu7vQl0wQv/C3ISjVVl4QXUDIGLyQHIRmmDk5qWpKvdYg== 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=/1xRbl0J+Wf0xLXr9vyrhLCt5JNrAM9KutvoO9JOFzE=; b=oypqzCeQXaQoWWjEm0u1O7VQatjAUomMjsorvRuQ9xo4tOlx0rvWobNdLTWDVfc89HJOLthlSMd4Qs8IFXKeEjUz/DnlxUh33ub0b5aU4rdswkMg25Ba5r4z7kYol9/EKUBkphU/hNe2zp0eMMmz0de9tQWIMqnJCJeGjDiemaY= Received: from AS8PR08MB7080.eurprd08.prod.outlook.com (2603:10a6:20b:401::19) by AS8PR08MB8490.eurprd08.prod.outlook.com (2603:10a6:20b:567::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Sun, 25 Jun 2023 07:55:25 +0000 Received: from AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::dd71:31fd:80b0:c4e0]) by AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::dd71:31fd:80b0:c4e0%4]) with mapi id 15.20.6521.026; Sun, 25 Jun 2023 07:55:25 +0000 From: Ruifeng Wang To: "thomas@monjalon.net" CC: "david.marchand@redhat.com" , "dev@dpdk.org" , "konstantin.v.ananyev@yandex.ru" , Honnappa Nagarahalli , nd , nd Subject: RE: [PATCH] eal: add notes to SMP memory barrier APIs Thread-Topic: [PATCH] eal: add notes to SMP memory barrier APIs Thread-Index: AQHZpAvj8kzdJhMlqUmgKdlh+VjK+a+U3CeAgAZNfxA= Date: Sun, 25 Jun 2023 07:55:25 +0000 Message-ID: References: <20230621064420.163931-1-ruifeng.wang@arm.com> <2110866.OBFZWjSADL@thomas> In-Reply-To: <2110866.OBFZWjSADL@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: BA3568FC18C3E34DA6CF006E6BBCA53A.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AS8PR08MB7080:EE_|AS8PR08MB8490:EE_|AM7EUR03FT054:EE_|PAVPR08MB9040:EE_ X-MS-Office365-Filtering-Correlation-Id: 3405021c-b925-49e0-66a5-08db755190fc x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: nBFCWEiY98XkFloouSxpIFX7GMv/iLeXeKvdaeOIanwyglKxxixxUcPT8u2ZljPue/NR3QTGeq4eTBxXkmQTfJgJoQQECJTfOS6OamzwQj3RFBD2aW9fkXGSiXTkL+1UNWoDmTZ742vZez6ORzKXBq36C7MTD7cp+SUS3SIqA8elY6h/Wirod+OnF9KWoU28cmhuIx/IS8MkPXSfVs1/UZjx8okocUHPezIjhMIvTmU4KfH102gwUJ9en3uHrc9mRyijaoYJxsUqx9jelLMCbSIKwxAifY8yI3BFLOe6+Y7nvuA4o28zInJ1Quk4SZ6Np2fBcJ7ucIM2HJhc6/c2t2kjSYuYzxW0OMOdu3VAZ+0KIV8SG/Hp8Ouw1FL1a6dyuB8ge4LtsZIDlfkVYe92idEt86O8tlUzvn9A9Mr1DicmKEj8QPjLrv0jRkDMsaKPbUJRiDYJfhV77U4YEP+dGvj6sN0Ys26kJ+xarIzMLrMyj6OpBMIzHnlHvfnHdtRk8TTxUv6cBv0Vd6svTeWKYVaKQ1wgcUacGRNCcF6Ll278gUPpSfNjGmW01komYwEVn/5yxk4vd4FS+PEbt4ew/r8/tcTfQqwmtfu0ARsAZIeDxWDTo+Ts45WPlqC83jsB X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB7080.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(396003)(136003)(376002)(366004)(451199021)(33656002)(5660300002)(52536014)(41300700001)(316002)(86362001)(66476007)(6916009)(66446008)(8936002)(8676002)(38070700005)(64756008)(66556008)(76116006)(4326008)(38100700002)(122000001)(55016003)(66946007)(966005)(26005)(53546011)(6506007)(2906002)(9686003)(186003)(7696005)(71200400001)(478600001)(54906003)(83380400001)(23180200003); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8490 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9f90dbab-a3fb-47a8-c70a-08db755188ce X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hkc+c+H8TckjW1UFDpRqrw1H7ingvgcYabjC8JDgD6eFL4JK/ZiWrPCN0gbdy8p1twrv4NvOTDT2nGXl2kAiNA/DQ1Rdyw/jXCL6ES2SFA27jgS9effZtX9ljXhHnFCe+czqzxrrBYXpKtsRgEtDVjPpTM3x2seMOUJxneY+BQvnOKY+je9vnNoKDce01ObRlb6VCXV3f+QZqQoXG2xDyEM8/C5g/0MzFcjW0iqf/a2XzBMKNCpzzK6Yqp9Kos4XTphfvBR9sCDMsui3o348Sk1Z0DvcMtIjxL9F3bN7acR7J0htT9Q9pNOK8DmU5MWAtaCTmw3/mlg6DPW/zv9sN3eozve+kYbJRQR1ZYho8jQ9SlytKlB+I3SJNy2oRRUh/xEi8E6EJwvDq8US90E3JBhlYbnMcFFzk6gvfZuBJA3JgqyU9+t6mmgfnew78ECKK5dfbRFqIAAd6HqVzvfwdDnr4VEOjEuPVay/7LvB7CqDJW2gxo56gzOlJliQwCFVjsGd9Pmd8et5Z8eEhvMu0rqsIJ/dCmY0WhmHCwUAF1cUQYqUSQscyKgCKLE7TRSkACZ2li6GshpNLgXuwow4JHbFBvAD/iBYtDmcQ3/jar2kIKJXa9pCZ19pcF6ISHuIlkOHZgNZH66woQjxjEyMpVU4jogHLD7zfDNEE4pSXaukMnAIOJNT20RJXEVkxZ7G8jBgofIqfcWI6w7Q3F2aqEVwWPTZgj0h8IOl2cy0jO0= 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:(13230028)(4636009)(39860400002)(376002)(346002)(136003)(396003)(451199021)(36840700001)(46966006)(6862004)(82310400005)(2906002)(186003)(26005)(47076005)(81166007)(336012)(53546011)(356005)(9686003)(40480700001)(6506007)(36860700001)(52536014)(5660300002)(41300700001)(83380400001)(70206006)(70586007)(8936002)(8676002)(33656002)(55016003)(82740400003)(54906003)(7696005)(966005)(86362001)(4326008)(478600001)(316002)(23180200003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2023 07:55:38.7693 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3405021c-b925-49e0-66a5-08db755190fc 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: AM7EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9040 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 > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, June 21, 2023 3:30 PM > To: Ruifeng Wang > Cc: david.marchand@redhat.com; dev@dpdk.org; konstantin.v.ananyev@yandex.= ru; Honnappa > Nagarahalli ; nd > Subject: Re: [PATCH] eal: add notes to SMP memory barrier APIs >=20 > 21/06/2023 08:44, Ruifeng Wang: > > + * @note > > + * This function is deprecated. It adds complexity to the memory > > + model > > + * used by this project. C11 memory model should always be used. > > + * rte_atomic_thread_fence() should be used instead. > > */ > > static inline void rte_smp_mb(void); >=20 > I think it should be more explicit: > "the memory model used by this project" -> the DPDK memory model Why it a= dds complexity? The rte_smp_xx APIs define a set of memory order semantics. It is redundant= given we are using memory order semantics defined in the C language. I'll make it more explicit in the next version. > What do you mean by "C11 memory model"? I mean the memory order semantics: https://en.cppreference.com/w/c/atomic/memory_order >=20