From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C603A0487 for ; Tue, 2 Jul 2019 16:07:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65A715B3E; Tue, 2 Jul 2019 16:07:54 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10049.outbound.protection.outlook.com [40.107.1.49]) by dpdk.org (Postfix) with ESMTP id C81FE5680 for ; Tue, 2 Jul 2019 16:07:52 +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=jxJQslIlzjlarlsijwdzbdaHjGGMfcqaM9Nr2q7H9oI=; b=Yk0iLzpsV9knoPstMP2OkuazIVhPPAU9NFohWTyTO3AtRu4J3lJrb7a4P/d35/iIHoA5nN1Z1O6wKGz1Tstz5y+/hfJfblzyLP2jgsRCMhprvBKFKhRPZGBKK9g9c1PPOB2PscFG+uOiQjYWwsmzWIppJ7m5PyJojNI1gGEcFBU= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB3102.eurprd08.prod.outlook.com (52.133.15.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Tue, 2 Jul 2019 14:07:50 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::f1a9:e870:d495:8d31]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::f1a9:e870:d495:8d31%5]) with mapi id 15.20.2032.019; Tue, 2 Jul 2019 14:07:50 +0000 From: "Gavin Hu (Arm Technology China)" To: "thomas@monjalon.net" CC: Stephen Hemminger , "dev@dpdk.org" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "bruce.richardson@intel.com" , "chaozhu@linux.vnet.ibm.com" , Honnappa Nagarahalli , nd , "gaetan.rivet@6wind.com" Thread-Topic: [dpdk-dev] [RFC 1/5] eal: add the APIs to wait until equal Thread-Index: AQHVL1/p6I9OLSsAOECZ0PPDfKo2XKa0pdaAgACwxmCAAAv6gIAB/ZaQ Date: Tue, 2 Jul 2019 14:07:50 +0000 Message-ID: References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <20190630132753.3f8139f0@hermes.lan> <2389802.2gLUSpxeUA@xps> In-Reply-To: <2389802.2gLUSpxeUA@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: f22f8dc2-ae81-4caf-bf8a-2674ff1e1bb6.0 x-checkrecipientchecked: true 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: 8d9c6e25-7590-4c49-6b83-08d6fef6ab44 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR08MB3102; x-ms-traffictypediagnostic: VI1PR08MB3102: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-microsoft-antispam-prvs: nodisclaimer: True x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 008663486A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(366004)(39860400002)(396003)(136003)(346002)(189003)(199004)(13464003)(54906003)(55236004)(6246003)(316002)(102836004)(2501003)(2906002)(26005)(81166006)(1730700003)(186003)(256004)(9686003)(14454004)(68736007)(8936002)(71190400001)(71200400001)(81156014)(5660300002)(55016002)(66066001)(2351001)(8676002)(5640700003)(6506007)(99286004)(6436002)(486006)(74316002)(11346002)(476003)(53936002)(229853002)(446003)(305945005)(33656002)(53546011)(7736002)(66446008)(7696005)(76176011)(25786009)(66476007)(64756008)(86362001)(66946007)(66556008)(3846002)(4326008)(478600001)(73956011)(6116002)(72206003)(6916009)(76116006)(52536014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3102; 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: X1cvOjxCqGCtAj/Zk4+N7DXNFJLQS1HldFR4QR3KGwwIMTRGlvaVVc14whO12E4s/JfZiZ7bZ41eI3+TO3WiH8Ffoj5LTord4xiBcwGxJc7MSZCoUvZiLX73xEfmA0p9tmEuw99Lxgia6f9GMkoYNMNOq/aDv7fIkFVYH9tVcmGRFXVucSB9yE6N9euIOKZd7HOFIuYrysznvf5MiItMMYujwj6BPmMOyiK91XWUxt7ufCl4lqVbpEEH+xqdIxJukEIYc6kla0cqelaQflZqHMihQFszfg/3natRrdd/fNGvp+e0SEeErb0uHI7YsbmIxlkhRM5z3cG72xxsgeEPNhfaKaBGPrCxAQbWuDlNAvVD3QLcaMXyx6YfD6km4Vj+jo3BZ2WoBcgpb/LCa50pEB5yNcJha7OTpp+6bppHkPs= 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: 8d9c6e25-7590-4c49-6b83-08d6fef6ab44 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2019 14:07:50.7052 (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: Gavin.Hu@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3102 Subject: Re: [dpdk-dev] [RFC 1/5] eal: add the APIs to wait until equal 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" Hi Thomas, > -----Original Message----- > From: Thomas Monjalon > Sent: Monday, July 1, 2019 3:43 PM > To: Gavin Hu (Arm Technology China) > Cc: Stephen Hemminger ; dev@dpdk.org; > jerinj@marvell.com; hemant.agrawal@nxp.com; > bruce.richardson@intel.com; chaozhu@linux.vnet.ibm.com; Honnappa > Nagarahalli ; nd ; > gaetan.rivet@6wind.com > Subject: Re: [dpdk-dev] [RFC 1/5] eal: add the APIs to wait until equal >=20 > 01/07/2019 09:16, Gavin Hu (Arm Technology China): > > From: Stephen Hemminger > > > Gavin Hu wrote: > > > > > > > +#ifdef RTE_USE_WFE > > > > +#define rte_wait_until_equal_relaxed(addr, expected) do {\ > [...] > > > That is a hot mess. > > > Macro's are harder to maintain and offer no benefit over inline funct= ions. > > > > During our internal review, I ever used C11 _Generic to generalize the = API > to take different types of arguments. >=20 > Gavin, the question is about macros versus functions. > Please, could you convert it into an inline function? Sure, I will do it in next version.