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 D49D2A0487 for ; Mon, 1 Jul 2019 09:43:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C93E82C23; Mon, 1 Jul 2019 09:43:32 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id E6DC32AB for ; Mon, 1 Jul 2019 09:43:30 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 695E621CFD; Mon, 1 Jul 2019 03:43:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 01 Jul 2019 03:43:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=nWnuSls+XkTtKcP19xivTAP7OgHyKn777LjiVqaVEiU=; b=gRCc+0iLTpFH 5VfZpQ4ETEVy1jC6oQ1rEx8NJ9zmJXGKQiMRb7hLPqwSt0iRrrSr9MCJfaWtnEjK 9JSpwtNgKkDRmJKifJkDJo5+J/8xMNbhTKtq03/pF6zwQZWoD2D2BYrzDyvL/tkq sJWkzjTXWHpGOK3jG0dkFeMdtYFHHwc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=nWnuSls+XkTtKcP19xivTAP7OgHyKn777LjiVqaVE iU=; b=FbXozCWVR+VxvXjhL/BoK8O7vV/yey5HMImKcwJ3/yVbYgn51pvF2W2S9 27n/m5Jbhv8YL/Xa2Ypb9gLa69r1tJfB/o9H4bl0swE/eotgsmtwuS2lb2mUCZk4 Is+1BbrlE+9kSeEKuepcFbSwcreOT/HoUMsRH/dsEX6WgJxTSa82yaON4z1Pkqsc tIKtelk4bqUwuwnryginKpcCAuiXHSCxx1f0XJ/vMt5VLgCs5qtaPblvu1uoyOJd RwB7doiKV9EU/T5XcIgrA/AqnFTJEFQHYijPzt6rkT3jEaXC4Oircj28zDJG/h22 frjcrHdu6FQ9nKpbJDiJijbTlj7rQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvdehgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuff homhgrihhnpehhuhgrrhhmrdgtohhmnecukfhppeejjedrudefgedrvddtfedrudekgeen ucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth enucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 279688006A; Mon, 1 Jul 2019 03:43:28 -0400 (EDT) From: Thomas Monjalon 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" Date: Mon, 01 Jul 2019 09:43:27 +0200 Message-ID: <2389802.2gLUSpxeUA@xps> In-Reply-To: References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <20190630132753.3f8139f0@hermes.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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 functions. > > During our internal review, I ever used C11 _Generic to generalize the API to take different types of arguments. Gavin, the question is about macros versus functions. Please, could you convert it into an inline function?