From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E8C5CA0096 for ; Fri, 15 Mar 2019 04:04:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 692363572; Fri, 15 Mar 2019 04:04:51 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140083.outbound.protection.outlook.com [40.107.14.83]) by dpdk.org (Postfix) with ESMTP id 899AB324D for ; Fri, 15 Mar 2019 04:04:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9SJjMfx5lKyGVkqhlrY/dkyQwNcFk01QP8AUUjR2n/k=; b=phplVY9pD8CWWKrKkhxO6lrIVyhaBlEGWIRGMg/t3CdjabLk3ocxJTMDZQeRC0vViMw0ucfCbFFb1+8jv1D96U1WT3TYtmGn4Y4Skq8C6CJOrozz1uIYNfwhjsvGnkBFS5Z5MNyer4l0iUByLfWEMWNXCPB24KHI49JIWNnv44c= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1SPR8PMB112.eurprd08.prod.outlook.com (10.163.248.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.22; Fri, 15 Mar 2019 03:04:47 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::707a:b455:dcb2:9d40]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::707a:b455:dcb2:9d40%2]) with mapi id 15.20.1709.011; Fri, 15 Mar 2019 03:04:47 +0000 From: "Gavin Hu (Arm Technology China)" To: Stephen Hemminger , "Joyce Kong (Arm Technology China)" CC: "dev@dpdk.org" , nd , "jerinj@marvell.com" , "konstantin.ananyev@intel.com" , "chaozhu@linux.vnet.ibm.com" , "bruce.richardson@intel.com" , "thomas@monjalon.net" , "hemant.agrawal@nxp.com" , Honnappa Nagarahalli Thread-Topic: [dpdk-dev] [PATCH v3 1/3] rwlock: reimplement with atomic builtins Thread-Index: AQHU2mgBXSwg4k2RNUabDHBbBDzeK6YLR5mAgAC5CCA= Date: Fri, 15 Mar 2019 03:04:47 +0000 Message-ID: References: <1552569304-74817-1-git-send-email-joyce.kong@arm.com> <1552569304-74817-2-git-send-email-joyce.kong@arm.com> <20190314085429.22ccd9ca@shemminger-XPS-13-9360> In-Reply-To: <20190314085429.22ccd9ca@shemminger-XPS-13-9360> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a096f3c9-ea3d-46c5-4a63-08d6a8f2fb93 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1SPR8PMB112; x-ms-traffictypediagnostic: VI1SPR8PMB112: x-ms-exchange-purlcount: 1 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-exchange-diagnostics: 1; VI1SPR8PMB112; 20:dsev+DYOR9ALjNnDCqlEmURXw5gxpccKNW6trs6/wHMh7ZhGhcM8rzZIRur5r44MPt+ZJ38GlwrvgCoDOAJthEBAx0IqfoA8LKACQcHAaNjihBMhiRKWdPLTwO80FwWme74m9EoE4SzZTY8r/1lwh+0hRPTE0HGU07Bvgvl75xM= x-microsoft-antispam-prvs: x-forefront-prvs: 09778E995A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(136003)(346002)(396003)(376002)(189003)(199004)(13464003)(11346002)(33656002)(486006)(3846002)(14454004)(478600001)(72206003)(476003)(446003)(966005)(6116002)(106356001)(105586002)(99286004)(8676002)(6636002)(316002)(81166006)(81156014)(74316002)(66066001)(7736002)(305945005)(186003)(8936002)(2906002)(110136005)(54906003)(26005)(4326008)(5660300002)(6246003)(102836004)(229853002)(97736004)(6436002)(76176011)(256004)(53936002)(53546011)(86362001)(55016002)(6506007)(6306002)(7696005)(9686003)(55236004)(71200400001)(25786009)(71190400001)(52536014)(68736007)(533714002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1SPR8PMB112; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 1VkGe047orMdO8bGm11qHO6X2JO9vden4y/8UolEYH2UuUg8QMQgFxPpOpzzf1hH7/hh0r7yY4nhXYcnm3Fcy/OOa2Na9bcNtFDEZoQ8Mt6qaPZrPQdqVfzIBeoOlW1VSy+9SiVuMaVjxDRYWHY5fTvCIrYHqroTaew1IxXEyi59xj8kja+jYtKZ3sFWlafDLBHGcRQrhR7O5TidnxoLNJKJjucp44zo71fnGuPLPx7Cl/ndz/uHK7IgRaWPkU6uSocvv890vyWE0AB+EPJvCf3JC06vYw9hg55cNmKpoHhXAOA7mUjPR78vmNWBcj5t1PDSUGBCW7cYuzCYIP/iFN76kamzF26x2prNub8jdOw0lQ9a4S/7IXDDyOHHk/DZbJSnqGGFmgaWLptc4QzheMPVq9NXBBP1U/gZhh2e5Ek= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: a096f3c9-ea3d-46c5-4a63-08d6a8f2fb93 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2019 03:04:47.5049 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1SPR8PMB112 Subject: Re: [dpdk-dev] [PATCH v3 1/3] rwlock: reimplement with atomic builtins X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Message-ID: <20190315030447.nJP6-p8viZcJKWSCF-yQCZxM-hyYWcIEvhfqvKSXjuQ@z> Hi Stephen, > -----Original Message----- > From: Stephen Hemminger > Sent: Thursday, March 14, 2019 11:54 PM > To: Joyce Kong (Arm Technology China) > Cc: dev@dpdk.org; nd ; Gavin Hu (Arm Technology China) > ; jerinj@marvell.com; konstantin.ananyev@intel.com; > chaozhu@linux.vnet.ibm.com; bruce.richardson@intel.com; > thomas@monjalon.net; hemant.agrawal@nxp.com; Honnappa Nagarahalli > > Subject: Re: [dpdk-dev] [PATCH v3 1/3] rwlock: reimplement with atomic > builtins >=20 > On Thu, 14 Mar 2019 21:15:02 +0800 > Joyce Kong wrote: >=20 > > - success =3D rte_atomic32_cmpset((volatile uint32_t *)&rwl- > >cnt, > > - (uint32_t)x, (uint32_t)(x + 1)); > > + success =3D __atomic_compare_exchange_n(&rwl->cnt, &x, > x+1, 1, > > + __ATOMIC_ACQUIRE, > __ATOMIC_RELAXED); >=20 > Would it be possible to have rte_atomic32_cmpset be an inline function > that became __atomic_comppare_exchange? Then all usages would be the > same. There is already a patch for this and Honnappa commented on this:=20 https://mails.dpdk.org/archives/dev/2019-January/124297.html