From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 64AB828BF for ; Wed, 29 Jun 2016 18:05:23 +0200 (CEST) Received: from [10.16.0.195] (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 30CE02456E; Wed, 29 Jun 2016 18:05:23 +0200 (CEST) To: "Wiles, Keith" , "Richardson, Bruce" , Thomas Monjalon References: <1467208504-13029-1-git-send-email-bruce.richardson@intel.com> <1544094.1XHU1bnLrI@xps13> <20160629160022.GA11824@bricha3-MOBL3> <4BCAFD5E-AB9D-4E82-A2FD-34FBEDC796BC@intel.com> Cc: "dev@dpdk.org" From: Olivier MATZ Message-ID: <5773F1C3.901@6wind.com> Date: Wed, 29 Jun 2016 18:05:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <4BCAFD5E-AB9D-4E82-A2FD-34FBEDC796BC@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] mempool: rename functions with confusing names 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: Wed, 29 Jun 2016 16:05:23 -0000 On 06/29/2016 06:02 PM, Wiles, Keith wrote: > > On 6/29/16, 11:00 AM, "dev on behalf of Bruce Richardson" wrote: > >> On Wed, Jun 29, 2016 at 05:55:27PM +0200, Thomas Monjalon wrote: >>> 2016-06-29 14:55, Bruce Richardson: >>>> The mempool_count and mempool_free_count behaved contrary to what their >>>> names suggested. The free_count function actually returned the number of >>>> elements that were allocated from the pool, not the number unallocated as >>>> the name implied. I agree the current API is not appropriate. >>>> Fix this by introducing two new functions to replace the old ones, >>>> * rte_mempool_unallocated_count to replace rte_mempool_count >>>> * rte_mempool_allocated_count to replace rte_mempool_free_count >>> >>> What about available/used instead of unallocated/allocated? >>> >> >> I don't particularly mind what the name is, to be honest. I like "avail" >> because it is shorter, but I'm a little uncertain about "used", because it >> implies that the entries are finished with i.e. like a used match, or tissue :-) >> >> How about "avail/in_use"? > > +1 for those names. +1 too. rte_mempool_avail_count() rte_mempool_in_use_count() Thanks