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 04BE5A034F; Fri, 7 May 2021 10:26:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 757DA4013F; Fri, 7 May 2021 10:26:12 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70045.outbound.protection.outlook.com [40.107.7.45]) by mails.dpdk.org (Postfix) with ESMTP id B883A40040 for ; Fri, 7 May 2021 10:26:11 +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=5beoGi6x03eY7j4U/FaU07J0Pzm4nRp8OKZ+K+8PQJg=; b=NNDc5lpmamASQHhSi50ayVH81NJLSTn3kwAVkY5DfIyDwR33Urbx+r5KyJvqZBt1zIgQsbfrERccENUwFHXZVwUdnRz2gGgWkY6fLFWhj/m2hNLMV5gSWv5exuKSqO17nLhecslI7bP4KLnrsKE91dkz+L2FvKHgggPh09q7zBw= Received: from MR2P264CA0074.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:32::14) by DB9PR08MB6960.eurprd08.prod.outlook.com (2603:10a6:10:2c0::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Fri, 7 May 2021 08:26:10 +0000 Received: from VE1EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:32:cafe::bb) by MR2P264CA0074.outlook.office365.com (2603:10a6:500:32::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Fri, 7 May 2021 08:26:10 +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 VE1EUR03FT033.mail.protection.outlook.com (10.152.18.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Fri, 7 May 2021 08:26:10 +0000 Received: ("Tessian outbound 8ca198b738d3:v91"); Fri, 07 May 2021 08:26:09 +0000 X-CR-MTA-TID: 64aa7808 Received: from be658cebd32f.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4E2BD213-D22B-4467-9B56-40EE05322149.1; Fri, 07 May 2021 08:26:00 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id be658cebd32f.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 07 May 2021 08:26:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=buXLSHBkgGDSDvefGockTeYmPL9Lv6s25YZrCcwSWK4N/8Q4xDxGm19EBFRW8vZsY8QyCH3QIVOrS1dDPSyP3Sonsxn/DCvAEeX4bkh4rfG9W2cOI7+WKdsesfTqRn5KiHME3sEBn5ed+a9w3w4z0vh6qUDwnxCi5j+TbA2EodW5Zq+Uyg+gEa4HAaOG+6zpGQj+xm2jVby/DW/b+sLp/bSxDp1wWE9AXc8kH6+VmjArpWyhhqvRQtwnqK4Bq38FAzi8yQD+vIeC2JmPwhXy7MzDXG10JA/vaHJ1xqLQr6mu25jXdRifbE2xhF0GeodUxSKsRK8oTl8XHi54+nAQUA== 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=5beoGi6x03eY7j4U/FaU07J0Pzm4nRp8OKZ+K+8PQJg=; b=HSqxewc+zyXP53Wvm1Z9ZZ12aldWvQdq4heIpHY559Jp8CqUlZJE26SSdqTzWlDlBD8pkizL+cEgqKAszFODFxamwgmwE+YODeaMoHtuI4tPaR4R90YRQcHpzm77+b5Yeg0oQZ3cm50v7/vcS6M6hblZ3xwa/egI5PgxlCFX05RqWXGSBABvS26v6+GGOZFdbMHztp0y0a00eo4aFhJJIPrfajezj/7VDzqJPiL3tlXfhAZHuO3hUA6nMymI8YyludY6ASXGGjy2ipl2WXqcXlSgBuDu86C73/T1Siq0P8eFIyNrW/6ENYpiKXVr/zIdL16zYeqYTAbRJyGbTHNKCQ== 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=5beoGi6x03eY7j4U/FaU07J0Pzm4nRp8OKZ+K+8PQJg=; b=NNDc5lpmamASQHhSi50ayVH81NJLSTn3kwAVkY5DfIyDwR33Urbx+r5KyJvqZBt1zIgQsbfrERccENUwFHXZVwUdnRz2gGgWkY6fLFWhj/m2hNLMV5gSWv5exuKSqO17nLhecslI7bP4KLnrsKE91dkz+L2FvKHgggPh09q7zBw= Received: from AM5PR0802MB2465.eurprd08.prod.outlook.com (2603:10a6:203:9f::22) by AM5PR0801MB1796.eurprd08.prod.outlook.com (2603:10a6:203:30::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Fri, 7 May 2021 08:25:54 +0000 Received: from AM5PR0802MB2465.eurprd08.prod.outlook.com ([fe80::e890:2ff8:8cdf:83b2]) by AM5PR0802MB2465.eurprd08.prod.outlook.com ([fe80::e890:2ff8:8cdf:83b2%4]) with mapi id 15.20.4108.028; Fri, 7 May 2021 08:25:54 +0000 From: Ruifeng Wang To: Stephen Hemminger CC: Honnappa Nagarahalli , Konstantin Ananyev , "dev@dpdk.org" , "david.marchand@redhat.com" , "thomas@monjalon.net" , "jerinj@marvell.com" , nd , Gavin Hu , Steve Capper , Ola Liljedahl , nd Thread-Topic: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail update on aarch64 Thread-Index: AQHXOZfwCrxIHsV030K/xbjEcGn+KqrKMXkAgAFjbcCAAAooAIAMIEoQ Date: Fri, 7 May 2021 08:25:54 +0000 Message-ID: References: <20200424070741.16619-1-gavin.hu@arm.com> <20210425055653.1509261-1-ruifeng.wang@arm.com> <20210425055653.1509261-3-ruifeng.wang@arm.com> <20210428101714.2e5da560@hermes.local> <20210429080542.11b797bb@hermes.local> In-Reply-To: <20210429080542.11b797bb@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 3D9B295FA754CA42ADA5B1FADF3924FA.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: [203.126.0.112] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 937a4c21-7927-4b46-d68d-08d91131c4d9 x-ms-traffictypediagnostic: AM5PR0801MB1796:|DB9PR08MB6960: 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:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0DVhXPYEIIhSxzW9zvQtYccQWBxDV/nEVslM5bO+nRDapkDmz5rV5ON5kORafPmAsa9bYZSJ6Q+7GuOc8GiqfrJZwyl39yIntfZ/JiPaeI3ecybxB/Ns3vo7RB/oHQn2OhYwaRNQMSfQj4tubRHCZsrlbyjm4I7+oNpWUHJQoNOPsi5ynoNEYTiTlT/9nbNB96GkLd76m+xcZBzSBWoKoeM5gWJVFQtoSyv1mCZFgZuXa2WxogdpAMwvNyE8uxWOlV831/iL9j0Qk7gKZ/G0064B6V5QGxX1hdzqTOIDXKrklA7ZXLKUPlmbo39pA5PoKn4VEQBuavkrjuuPv0oWGAl5johEiwqgZsEd+P8w+e8+JhZOsxyFNJfs/tD01ntYPKE7y596SZ7f4V/KSizFCc2xf2I14MPFR0XwHlBEEI8hz/chwoCRUsTHZAOIAsjwuWsTbjXw4sxprygyRlsmV94J22XnS3ma9lMNgEtv30iAm4bW4RqmEOjzXfspARp91iOrKyFI1VPbfCmaCNedvyEO0X1gfqXObyxRkbCz2vnI8zkgK+0/YATQX2tU14Ev7+LlXnRxRnPFwCmuv+LI2mPMbniUvhSWdTBR9laxJhvXC9bcF0oeYo/MXPaTGgxj2pq72/mBdg+3NFguk99Hrw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM5PR0802MB2465.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(376002)(366004)(39860400002)(5660300002)(8936002)(86362001)(2906002)(186003)(53546011)(122000001)(54906003)(478600001)(33656002)(83380400001)(38100700002)(6506007)(66476007)(64756008)(15650500001)(4326008)(26005)(55016002)(52536014)(8676002)(71200400001)(7696005)(6916009)(316002)(66946007)(76116006)(9686003)(66446008)(66556008)(21314003); DIR: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ascii?Q?nI5JD3hKTzLMaSrfUj1JQhfkmQmUVXKI1n9f2r8QT1RPFgJEFulYi3w4TiFB?= =?us-ascii?Q?0gotxzUGFbgZf25ZhhZPWgfks4Sv+L9Oa4h+GJvL1xNnofc8u7RI5fX23gGX?= =?us-ascii?Q?0hdT7pRBZnflnqKMMWsOS3zl826ELv50zmLM3mq/rsMex3+CM4JGO3n+/3e4?= =?us-ascii?Q?aomeKgQTCKqexzNQ76DP+tZ6g5mGVV/ebBdInh0G90PCucOxEYFRoxkQEs+i?= =?us-ascii?Q?61dfiLHtKaMb7ZWdVoSMEHetLwNSB8/2vvK6YuSt1znTunBnu/ODpJNrGlLM?= =?us-ascii?Q?E9J3JLC67NkVvjwrRJn67rDoxEumcfCDsKVsjOwCMpFjP4wglVsLAFsJKjpm?= =?us-ascii?Q?seyRmW4Ppll7A2hKJs3cWVkV/aze7ClqUzrHmXCGpV89VJsi+4w7uCgx2SCr?= =?us-ascii?Q?753Ez5w5cxbhmEFkL4UxjpVZCFCgIPuVY/8J7x3eCOfesPrJ+g0bPjxuf9/h?= =?us-ascii?Q?h8hRP7BL8t+W8MSKN5J41gVz?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1796 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: VE1EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 77a5a160-27ce-4a31-ae7e-08d91131bb58 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NDHqKLbTOxboGff/7XGFxuYGPcEFTlf/Zq7L2TPPEPHyNj4pBhpJ+ELnZfj1cStWGJJx76EP3HTck5vI/CQTcNpLwceTSJ+RMhVeYoH3MGO571PmtD2SlBGaRVffd+DeGHSmT6d0+IHeRG2itFapokE+6W64d28bJHiiTKVZfDuThKx7bVgKuODi7s9mQ8HbFHwQQ/VWw2OVyAXRS2HscpjxBwo8zwyklwtDsFKCtYtwNjskdwAatdohkFtrxrKuWe03WoF38zLAok0AZOnW932+/aFmFaENZjfsL14hG4Aw9k5TBtpCADhwSSHMrwi76kwDJD9/IVsfRRiJxMqu1dS+/fbeuHhvpgfgIofxSyivQ2LgeMeuarolnfzShmQml3K7yAC3gbuMKq6ZMSfJj5KGsDeQnIlAsYFyv4zPWfgfqO9ikrZ7Sj6Inv9akDFeSwGsYF3rVsx+fV1x2oM2n4utjbj6aL9Y1bOGGnROdGhUXg5SCH2yp5Q7tmv9LtgMfwuAPEHaLTV+6199EPlcCw8rYp8tEoHbofoZrGFaNOYvih+GlkXCa+jRlBm6esLoJSjEzZgtHLcjQYury3iiLiNgzEgj9vt2C7bCxNE0nsi4KIg3gQJF/RttVU+N9hjpXH4P50HZC5v3mMQ77yrGpemBkARf+Rd7P+JnPLe905QSH4WvgGrUpTWyt3cWbPtH 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)(396003)(346002)(39830400003)(136003)(376002)(36840700001)(46966006)(83380400001)(356005)(33656002)(70206006)(5660300002)(7696005)(53546011)(316002)(81166007)(70586007)(52536014)(86362001)(47076005)(4326008)(2906002)(15650500001)(36860700001)(26005)(186003)(6862004)(9686003)(8936002)(478600001)(336012)(8676002)(6506007)(55016002)(82310400003)(54906003)(21314003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2021 08:26:10.2046 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 937a4c21-7927-4b46-d68d-08d91131c4d9 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: VE1EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6960 Subject: Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail update on aarch64 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" > -----Original Message----- > From: Stephen Hemminger > Sent: Thursday, April 29, 2021 11:06 PM > To: Ruifeng Wang > Cc: Honnappa Nagarahalli ; Konstantin > Ananyev ; dev@dpdk.org; > david.marchand@redhat.com; thomas@monjalon.net; jerinj@marvell.com; > nd ; Gavin Hu ; Steve Capper > ; Ola Liljedahl > Subject: Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tai= l > update on aarch64 >=20 > On Thu, 29 Apr 2021 14:35:35 +0000 > Ruifeng Wang wrote: >=20 > > > -----Original Message----- > > > From: Stephen Hemminger > > > Sent: Thursday, April 29, 2021 1:17 AM > > > To: Ruifeng Wang > > > Cc: Honnappa Nagarahalli ; Konstantin > > > Ananyev ; dev@dpdk.org; > > > david.marchand@redhat.com; thomas@monjalon.net; > jerinj@marvell.com; > > > nd ; Gavin Hu ; Steve Capper > > > ; Ola Liljedahl > > > Subject: Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for > > > ring tail update on aarch64 > > > > > > On Sun, 25 Apr 2021 05:56:53 +0000 > > > Ruifeng Wang wrote: > > > > > > > Instead of polling for tail to be updated, use wfe instruction. > > > > > > > > Signed-off-by: Gavin Hu > > > > Signed-off-by: Ruifeng Wang > > > > Reviewed-by: Steve Capper > > > > Reviewed-by: Ola Liljedahl > > > > Reviewed-by: Honnappa Nagarahalli > > > > Acked-by: Konstantin Ananyev > > > > > > Looks ok to me, but it does raise an interesting question. > > > Shouldn't the original code have been using atomic load to look at ht= ->tail. > > > > > > This another place where "volatile considered harmful" applies. > > > > Do you mean 'volatile' should be removed from rte_wait_until_equal_xxx > parameters? > > >=20 > I meant that all access to tail should be via C11 atomic builtin. At that= point, > the volatile on the data structure elements does not matter. Agreed. If synchronization is ensured by using C11 atomic builtin, 'volatil= e' on elements can be removed.