From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2E6EA0542; Wed, 5 Oct 2022 17:23:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64C7540694; Wed, 5 Oct 2022 17:23:08 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id A443640143 for ; Wed, 5 Oct 2022 17:23:06 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id C0BAD32007BE; Wed, 5 Oct 2022 11:23:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 05 Oct 2022 11:23:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1664983384; x= 1665069784; bh=Px4b/pjP3AQmpDMJNpv1wB+Os3VMQJLvc+a2aV7U2M0=; b=o 17ctgJKw23yrYPWioIYLO7Pzp29xCXWnjwTp41U2fthBc1y2AkfBljyilC0ZbTYT pZVz2FanWefW1ikVAKPpNh07+edIbo21vHI40c0TXLUfhja3kgNN4du4RZB+q3q1 dVqVw7ZWjxJtz2FuQIvhjFKEE9rhDFO+mvVwIzs4Ey8Kv/x872RcuMaZeJnp5m9m TIzvc4R25DHuxlpyg+p+eb6G/v28ngy48g4XIks3rNWCfgqWq6aq0fIF4UD7eM6s 363c/MvAW3dAGYBnZB9IDZkZo/w9pyjBIqA/hLSk4V78qDdRKkXc31ZBs/E0m6af qJTRLoEuj2sfNv3LyV08g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1664983384; x= 1665069784; bh=Px4b/pjP3AQmpDMJNpv1wB+Os3VMQJLvc+a2aV7U2M0=; b=2 CIBE3hUBg0KU0FkZa1olJWil6e5rot3lAI4JzNJ60ewBoYZo30nPxxGkVwIvAfQp RKhLMoy4QOsI50Yk9a5Bu6TG/I0Xrh3gM77DO2c2ItMHXTSqmgLQ893feVtohJab cJIZgMVaRFy/+sOoHJSaJ/m/IkPAxRt2CbprHqdmhL+qB4IQEdD5748ltHHXth9R DWeBneYiRZib4viJUnqTTDTMGc1jHZZ74dkoKZF7BQV6Y6boT9Kh25qU/D3/wHKr 2C3h8qSdCZRT+U4Tjdy/Eu3ipPf4gkXR4W497fAFtXAekQsA7Vhn2RUfF39fDrEN ul9U8ea2AIzuHSzB/8VUw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeifedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkfgjfhgggfgtsehtuf ertddttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnheptdejieeifeehtdffgf dvleetueeffeehueejgfeuteeftddtieekgfekudehtdfgnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonh drnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Oct 2022 11:23:03 -0400 (EDT) From: Thomas Monjalon To: Tyler Retzlaff Cc: dev@dpdk.org, anatoly.burakov@intel.com, ranjit.menon@intel.com, mb@smartsharesystems.com, Tyler Retzlaff , stephen@networkplumber.org Subject: Re: [PATCH 2/3] eal: change rte_fls and rte_bsf to return uint32_t Date: Wed, 05 Oct 2022 17:23:01 +0200 Message-ID: <22501102.ssLaC8jLEa@thomas> In-Reply-To: <20221005151532.GA7581@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1615418650-19513-1-git-send-email-roretzla@linux.microsoft.com> <1849229.jbyF5MZJ3u@thomas> <20221005151532.GA7581@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 05/10/2022 17:15, Tyler Retzlaff: > On Wed, Oct 05, 2022 at 11:02:45AM +0200, Thomas Monjalon wrote: > > 08/08/2022 23:21, Tyler Retzlaff: > > > From: Tyler Retzlaff > > > > > > > You forgot the _safe versions: > > > > > --- a/lib/eal/include/rte_common.h > > +++ b/lib/eal/include/rte_common.h > > @@ -660,7 +660,7 @@ rte_bsf32(uint32_t v) > > * @return > > * Returns 0 if ``v`` was 0, otherwise returns 1. > > */ > > -static inline int > > +static inline uint32_t > > rte_bsf32_safe(uint32_t v, uint32_t *pos) > > { > > if (v == 0) > > @@ -739,7 +739,7 @@ rte_bsf64(uint64_t v) > > * @return > > * Returns 0 if ``v`` was 0, otherwise returns 1. > > */ > > -static inline int > > +static inline uint32_t > > rte_bsf64_safe(uint64_t v, uint32_t *pos) > > { > > if (v == 0) > > > > > > > > > > the return values from the _safe versions are `int' treated > like a bool type. they have been left as is to be consistent > with the rest of dpdk return value types. > > the non-safe version returns were returning actual values > and not an indication of success or failure. > > they could certainly be changed to C99 fixed width types but > if they are changed at all perhaps they should be changed to > _Bool or bool from stdbool.h? > > it looks like this change has been merged already but if you > would like to make any further changes let me know i'll take > care of it. Sorry, it's my mistake, I went too fast. I'll revert them to int.