From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH] mempool: rename functions with confusing names Date: Wed, 29 Jun 2016 17:00:22 +0100 Message-ID: <20160629160022.GA11824@bricha3-MOBL3> References: <1467208504-13029-1-git-send-email-bruce.richardson@intel.com> <1544094.1XHU1bnLrI@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, olivier.matz@6wind.com To: Thomas Monjalon Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D440B2BA7 for ; Wed, 29 Jun 2016 18:00:40 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1544094.1XHU1bnLrI@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. > > > > 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"? /Bruce