From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCC34C43613 for ; Mon, 24 Jun 2019 17:41:13 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4F41520645 for ; Mon, 24 Jun 2019 17:41:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="Qw1yVsy7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F41520645 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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