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 56CF3A04F3; Fri, 20 Dec 2019 01:27:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 936461BE8A; Fri, 20 Dec 2019 01:27:21 +0100 (CET) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 5A71F1BC25 for ; Fri, 20 Dec 2019 01:27:20 +0100 (CET) Received: by mail-pl1-f195.google.com with SMTP id az3so3311746plb.11 for ; Thu, 19 Dec 2019 16:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sIJJWMRyvZ8D70XqMXWEKcbDjjzexib3frm8+zoKOC0=; b=pZYXmgW7Mf/3aIJXU4MLFzqXDt9UI0/guj9c1QJPqSnsr5O/9G2tWpfjDWez8eQpPw bndT1RTNqrV9exqtC4HKLf0kbKadAb6JRO7cxcnmQRV67kQBJA6QzGdljQD+ToIN0ucX bpfjlbuZ8oIDraCbyPiEZLyToZzw+Gkt/JQ1DYlgg60mP5pnCMUufSDYjSrNhjf+mVSb j4q/R993KA7gV7jyrJnG2IVJhGMQimjhZ9Mtm12xCAdyz7W+mblM/mfVt9RGSW3jXeof VzoXKhK+BsXUkJvLgm/GSOSQwuDfY3RyEwJUSaQjkl7hnSI17luG24ffheVpwxbKrMmb ZMbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sIJJWMRyvZ8D70XqMXWEKcbDjjzexib3frm8+zoKOC0=; b=U3LW7WiH4DFC/OolvshOoW/G6DMb0E92h/3EHyf8WeYqwSGdbmv9NWOw9yZXe/kr5K f8J04/jE7mRxmzG8quqWues2Kg18ZNoAL6TbDxsdVr3JJUOqOBTDrC2/iWvYWBIXoxwa cYR9mdQ2+ywFfVWWnA2tjJkjaFjFvG32iPhcxeRl0/zv6WFW8/+/LLYXudt7eBm47Z/i 3kJR+5W7ZgnTC8HkFmcEdZGsfF5vL2fPL/TEny10s6nH76WX90sd2xvnSo4yn74Zlq9o 6h035cLcihEdf3gnVbPpHO49OWc0Cp0X09r2cVlVVbTHDOhf0tv/PSABvWHwPYtw2pxs C5/g== X-Gm-Message-State: APjAAAXopbmMBcQH5ef2AP/h/fcDeajrkyBGKqD5VV5cDwEPTwiz0qm8 R2b3a3jhV4acFNVwtGJaDub6AQ== X-Google-Smtp-Source: APXvYqxSI03nFcb1Na97Q8hp2gIjks5FUtXpAM0xNsWWlPBgBY6HeCAh/zm/yWfO/9AM2bz3cH9bFw== X-Received: by 2002:a17:902:c693:: with SMTP id r19mr12716207plx.25.1576801639518; Thu, 19 Dec 2019 16:27:19 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id p28sm8846591pgb.93.2019.12.19.16.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 16:27:19 -0800 (PST) Date: Thu, 19 Dec 2019 16:27:11 -0800 From: Stephen Hemminger To: Alfredo Cardigliano Cc: John McNamara , Marko Kovacevic , Anatoly Burakov , dev@dpdk.org Message-ID: <20191219162711.399274ed@hermes.lan> In-Reply-To: <20191219221847.29989-5-cardigliano@ntop.org> References: <20191219221847.29989-1-cardigliano@ntop.org> <20191219221847.29989-5-cardigliano@ntop.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 04/17] net/ionic: register and initialize the adapter 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" On Thu, 19 Dec 2019 23:18:34 +0100 Alfredo Cardigliano wrote: > + > +static inline uint16_t ilog2(uint32_t n) > +{ > + uint16_t logv = -1; > + > + if (n == 0) > + return 0; > + > + while (n) { > + logv++; > + n >>= 1; > + } > + > + return logv; > +} There already is rte_log2_u32?