From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by dpdk.org (Postfix) with ESMTP id A11FE5A4B for ; Fri, 22 May 2015 18:43:17 +0200 (CEST) Received: by pdea3 with SMTP id a3so23579596pde.2 for ; Fri, 22 May 2015 09:43:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=NNZYuCeq2bt/xSC8Aujv1iQ/52c76Ki6QnAzHiB+uO4=; b=ennugd0F+RfZ4wsKGvt4XJwGKJq+7bn/LkO59xQ3Q0n8e2QwcQJDHnps+Q2nXcWebn wp4dwL2ctBVMfiuMMoUaQ1zvrTmn3zU0tChAeo6aXbjmcG2VvWo/h4gh73pIJ7q6hdq8 QDvYFC8DghgNEzwv/5BHGSeSNhok7PP/xkNRSwFbKixFL+xOnCQIWacxoQQHEzv8/Div +qOlV1HwsPe+1AH8INOcOUz5ZQMcIODdaCu2iBZTaOceX3amwV1T008RzZVfj8WDID0Q gU9AyjSpqvIZ7ZQJYv5vKoVX94k891kQ9JRhKQXsBSbxOQJWh80Q+jKkZjYyWnDwbmNB yjcw== X-Gm-Message-State: ALoCoQl1jdaJrtsjdcJTNDNG4BBQyrAp0r6Fx44oPYPymCXTeFRy8rO3kA818T7YDJolRBl/ozlx X-Received: by 10.66.186.142 with SMTP id fk14mr17172659pac.74.1432312996941; Fri, 22 May 2015 09:43:16 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id lc14sm2624960pab.33.2015.05.22.09.43.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 09:43:16 -0700 (PDT) Date: Fri, 22 May 2015 09:43:20 -0700 From: Stephen Hemminger To: Rahul Lakkireddy Message-ID: <20150522094320.1e10251d@urahara> In-Reply-To: <25f06823ef87d05bf57d996df387478e7fbc966f.1432300701.git.rahul.lakkireddy@chelsio.com> References: <25f06823ef87d05bf57d996df387478e7fbc966f.1432300701.git.rahul.lakkireddy@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Felix Marti , Kumar Sanghvi , Nirranjan Kirubaharan Subject: Re: [dpdk-dev] [PATCH 2/5] cxgbe: add cxgbe poll mode driver. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 16:43:18 -0000 On Fri, 22 May 2015 18:54:20 +0530 Rahul Lakkireddy wrote: > +/** > + * fls - find last (most-significant) bit set > + * @x: the word to search > + * > + * This is defined the same way as ffs. > + * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. > + */ > +static inline int fls(int x) Isn't there a Gcc intrinsic already for this?