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 422D6A0563; Wed, 15 Apr 2020 16:42:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F29E1C1F7; Wed, 15 Apr 2020 16:42:57 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id E1B131C1E5 for ; Wed, 15 Apr 2020 16:42:56 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 7612F5C01BF; Wed, 15 Apr 2020 10:42:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 15 Apr 2020 10:42:56 -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=9u+LfJLafgzkVir27PT390fYrp4BZysb24PON+8OQNg=; b=H+fiNAkDACvj 83hRR1txIez5+FY85cu0uvceGIX7Ljt7E1MXklztPxMQdWC7j2dzax8wfj5sVVFA NVjOoPBoFdG8XO06NFkLUYXyaMVYT0ONvB3tZn6CDnC0b3TPzKZx20DA3tzqNtnT sScRAwj4/4ISfSJCUIzaTA3+ICPs6GY= 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=fm2; bh=9u+LfJLafgzkVir27PT390fYrp4BZysb24PON+8OQ Ng=; b=eCDr7xgVmXFuaiuBFvLE0V7HpEBp6o3ad952M+fTNeTSTWN5iO9dipSoi 2spispoDEeuG06Lf1AFZEKRKKmDB+KE7II68Jtt3QB0jV9SPEf3n8rEdvOLu0ikD CGj6/P6TxcXsrcGFGmADyrTugNWv+cL8mKdBmNQ4i8uMfN+8B63K5oGQocZTHfS/ IZGAH1tr++uruNZu4zZMmmL4hyBFzt1yAP/1HKr1UJqAmfNC/ZmH6rAquscahF5K MxYVPm1Qgvlyedgi4s62/HUbN9WyAFH98LM+tsMGEVX4x/xiyX52Gmq0fMQgHJmA ZKnzfWE4DrXOnvIa2TS2M801B0/sw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfeefgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 07D923060061; Wed, 15 Apr 2020 10:42:54 -0400 (EDT) From: Thomas Monjalon To: Suanming Mou Cc: "dev@dpdk.org" , "amo@semihalf.com" , Cristian Dumitrescu Date: Wed, 15 Apr 2020 16:42:52 +0200 Message-ID: <3431556.3Lj2Plt8kZ@thomas> In-Reply-To: References: <1583828479-204084-1-git-send-email-suanmingm@mellanox.com> <20200415141529.2057898-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] bitmap: add init with all bits set 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" 15/04/2020 16:22, Suanming Mou: > Hi Thomas, > > Thanks for the update. > > From: Thomas Monjalon > > > > From: Suanming Mou > > > > Currently, in the case to use bitmap as resource allocator, after bitmap creation, > > all the bitmap bits should be set to indicate the bit available. Every time when > > allocate one bit, search for the set bits and clear it to make it in use. > > > > Add a new rte_bitmap_init_with_all_set() function to have a quick fill up the > > bitmap bits. > > > > Comparing with the case create the bitmap as empty and set the bitmap one by > > one, the new function costs less cycles. > > > > Signed-off-by: Suanming Mou > > Acked-by: Cristian Dumitrescu > Reviewed-by: Suanming Mou > > --- > > > > v4: > > - add experimental tags and comments > > - move functions near original init function > > - squash test patch > > - use "init" word in title > > > > v3 updates: > > 1. Implement individual rte_bitmap_init_with_all_set() function. > > 2. Add new function to clear the overhead bits. > > > > v2 updates: > > 1. Split the common part to __rte_bitmap_init(). > > 2. Set the slab bits more customized. Applied, thanks