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 D201FA046B for ; Mon, 24 Jun 2019 19:41:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AA591BC9C; Mon, 24 Jun 2019 19:41:11 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50059.outbound.protection.outlook.com [40.107.5.59]) by dpdk.org (Postfix) with ESMTP id 9F9181BC96 for ; Mon, 24 Jun 2019 19:41:09 +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=HZlZ5cGYPjzuAmVG38tkHIXlYQtyEQSDQbqlW6AwO2I=; b=Qw1yVsy7mu6M+st5sI78Fvtf+/M8pIxZibkuZC4alowArLi5K1g7PY1CChXmFZEGLOLGFz18nyH3D5Mq1F7UtqXPmpotL9AXjc+yUCclNMmP7CmN5e3WyxKkz49++vE+gEZ43i23CkxUMnPL55u4oXAN5Mg7cVh+KwrIBQhegUs= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by VE1PR08MB5213.eurprd08.prod.outlook.com (10.255.159.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Mon, 24 Jun 2019 17:41:08 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::a89e:33:fbda:ed35]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::a89e:33:fbda:ed35%4]) with mapi id 15.20.2008.014; Mon, 24 Jun 2019 17:41:07 +0000 From: Honnappa Nagarahalli To: "thomas@monjalon.net" , "Phil Yang (Arm Technology China)" CC: "jerinj@marvell.com" , "dev@dpdk.org" , "hemant.agrawal@nxp.com" , "Gavin Hu (Arm Technology China)" , Honnappa Nagarahalli , nd , "gage.eads@intel.com" , nd Thread-Topic: [PATCH v2 1/3] eal/arm64: add 128-bit atomic compare exchange Thread-Index: AdUqVpABcLyZ0lTxQfaR61ir9fMMZQAS9vkAAAEUrzAAAK9CgAACbk8Q Date: Mon, 24 Jun 2019 17:41:07 +0000 Message-ID: References: <22963143.DP9djbVQ2r@xps> In-Reply-To: <22963143.DP9djbVQ2r@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 91cb1fdd-670b-4b8a-9044-217f7770f7c0.0 x-checkrecipientchecked: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bd8f38e1-2726-4697-3355-08d6f8cb23ab x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB5213; x-ms-traffictypediagnostic: VE1PR08MB5213: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 007814487B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(376002)(366004)(39860400002)(396003)(189003)(199004)(6246003)(4326008)(25786009)(9686003)(256004)(14444005)(72206003)(55016002)(6436002)(4744005)(53936002)(52536014)(66476007)(73956011)(71190400001)(3846002)(66946007)(86362001)(14454004)(478600001)(76116006)(6116002)(446003)(229853002)(66556008)(64756008)(66446008)(486006)(11346002)(476003)(71200400001)(5660300002)(54906003)(110136005)(316002)(2906002)(6506007)(76176011)(6636002)(7696005)(99286004)(68736007)(26005)(8936002)(33656002)(305945005)(7736002)(2501003)(74316002)(8676002)(81166006)(81156014)(66066001)(186003)(102836004); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5213; H:VE1PR08MB5149.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: oCFW6yO7iyRH6np5WB25RDoZN7HATN3ysgRkOHFBWvqf5SYqmtfZ2H7WkOcIVS+pCSIXfcV58BRtf2rRLaHPrFOHXAmee646pG7vtLrk8yZcAbhwCXHLkOZ/ojJC3LSthKdkSOEfoox8bZRGxcblAdPECPmuDvQMy9NyJi1UnyJe38eZ4OK+2MqRK8k4n43OmP4qLEbO4IHqjy9JYZTcLyzxGaPFTQr4dGe9TzYq9n+TM96x+MB7/dP/WzW6zOVTxQZzIP2KdXOSxagvXFWmtvcQDblOFk0cmKQMAQyvfYllBJPBG/FyyLo8YtYe5nsTBsOUeCzIGOYqFxVvkCDgP7oJw+E1W10l3NB/+Qetq9L98WYDUTIhfl4Bgr2svqHwcLUBi5AB63oH+3BTMzdY82pB2HuHtqLPLophAz/nwSg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd8f38e1-2726-4697-3355-08d6f8cb23ab X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2019 17:41:07.8486 (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-CrossTenant-userprincipalname: Honnappa.Nagarahalli@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5213 Subject: Re: [dpdk-dev] [PATCH v2 1/3] eal/arm64: add 128-bit atomic compare exchange 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" >=20 > 24/06/2019 18:12, Honnappa Nagarahalli: > > > > > + } else { > > > > > + rte_panic("Invalid memory order\n"); > > > > > > > > > > > > rte_panic should be removed from library. In this case, I think, > > > > invalid mo can go for strongest barrier. > > > > It is added here to capture programming errors. > > Memory order can be passed during compilation or during run time. > > 'rte_panic' supports both of these. > > Adding code with strongest memory order will mask the programming error= . >=20 > An error must return a specific code from the function. > rte_panic is really forbidden in libraries. > We are in the process of removing all of them. Thank you for clarifying. In this particular use case, the API is similar to '__atomic_compare_exchan= ge' built-in. Users would expect similar behavior. If we are differing from= the standard behavior, we should document it in the API definition. =20 >=20 >=20