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 7986BA00BE; Tue, 7 Jul 2020 14:13:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 21D591D951; Tue, 7 Jul 2020 14:13:16 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id DB37A1D94A for ; Tue, 7 Jul 2020 14:13:14 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2A2AE5C01F2; Tue, 7 Jul 2020 08:13:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 07 Jul 2020 08:13:13 -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=fm1; bh= xp1ZkSq1V9E2fBvQ4u5+tSscDFwdqK244M6UIC9qbU4=; b=DT9nV/AxrwkjQl+E Vm3uzoSh30MPv5ZXNNR1fpIk372rxwZvXrbiOJhd6zrxDN4HWmuR0N/4v9djQJfA Thj7aAmjWkn+Sv/ntNIRDs1s/vsze782GWpchRqv1pBkFy5upxxOTfj0OSdsm0VL 2METGlZTL7AuA3k9n03cKfvw2HqAwb1MiyWaNq2NRQTGcJC/V873tXICVV3VYdgs acBusVUL+yIV0YOSczrdckvHvGH3Q6zGx/2usA2066qN7mw7mE1U+m5sDslyhfjK toP/pLNHpvPXfQCTzkvrPE/9T1SVDWo1eJdeJ1TEIMZSfHS/bN5RVM4vIkHTjWQ2 MNW4Vg== 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=xp1ZkSq1V9E2fBvQ4u5+tSscDFwdqK244M6UIC9qb U4=; b=O2NcSlFTpbjd+bu3y2FF7MEcKnuIvfajsaUBQObo2pR9WeVrUMW+DD+NX hwqoVxQCLYy/H5M3e1ckdI6IQNO+t9Ae0THqLa9ziFLSiDu15IrqSpZZeT1813xd +I6t+fW7xsWy1dBuGV+OIHxAv+6gf+ShQSCHNtR6EbMgfmGWLF2VtrybaMSmuu54 GiobVBx9gPedw5oJ5+cRqqCB2TQGfjNE3mw7ITdIbp4tF5H8TBTKJ9CD6begJPyv wY1ajNzQrxUNhAwXHdd1HG+6tGs2e6ZkwsCd1j3p8m2gKjiiXBhf7jmch2lNe1Tv uGWOXRZRehJgltZksAjjTUesfA8kQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudehgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpeefgeffiefhfeettdfhvdfgteekffffudekvedtvedtvdfgveeuudev gedvgeegtdenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth 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 1E51D3280059; Tue, 7 Jul 2020 08:13:11 -0400 (EDT) From: Thomas Monjalon To: Parav Pandit Cc: Morten =?ISO-8859-1?Q?Br=F8rup?= , "dev@dpdk.org" , "grive@u256.net" , "ferruh.yigit@intel.com" , Ori Kam , Matan Azrad Date: Tue, 07 Jul 2020 14:13:10 +0200 Message-ID: <3379690.1gGlKYMXnk@thomas> In-Reply-To: References: <20200610171728.89-2-parav@mellanox.com> <98CBD80474FA8B44BF855DF32C47DC35C610FE@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [dpdk-dev] [PATCH v4 01/10] eal: introduce macros for getting valuefor bit 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" 07/07/2020 13:38, Parav Pandit: > From: Morten Br=F8rup > > From: Parav Pandit > > > --- a/lib/librte_eal/include/rte_bitops.h > > > +++ b/lib/librte_eal/include/rte_bitops.h > > > @@ -17,6 +17,8 @@ > > > #include > > > #include > > > > > > +#define RTE_BIT(bit_num) (1UL << (bit_num)) > >=20 > > Is the return value 32 or 64 bit, or is intended to depend on the target > > architecture? > > > It should be 64-bit. > =20 > > Please be explicit by using UINT32_C(1) or UINT64_C(1) instead of 1UL, = if you > > want a specific size. > >=20 > Will do UINT64_C(1). >=20 > > It could be a static inline __attribute__((__pure__)) function instead = of a macro, > > but it's not important for me. > >=20 > > The macro/function needs a description for the documentation. > >=20 > In this header file or outside? It is asked to add a doxygen comment. > > I'm also concerned about the name of the macro being too generic. But t= he > > effort of changing all the drivers where it is being used already could= be too big > > if the name changes too. > > > Right. Currently drivers have generic name as BIT(). Close to 3000 entrie= s. > So doing at RTE_BIT to match other rte_ APIs. > Drivers can slowly migrate at their pace to this one. > =20 > > And the macro/function is new, so shouldn't it - in theory - be marked = as > > experimental? >=20 > How to mark a macro as experimental? A macro cannot be experimental.