From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 29 Jun 2016 09:00:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,547,1459839600"; d="scan'208";a="837441190" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.81]) by orsmga003.jf.intel.com with SMTP; 29 Jun 2016 09:00:24 -0700 Received: by (sSMTP sendmail emulation); Wed, 29 Jun 2016 17:00:23 +0025 Date: Wed, 29 Jun 2016 17:00:22 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, olivier.matz@6wind.com 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 Content-Disposition: inline In-Reply-To: <1544094.1XHU1bnLrI@xps13> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) 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:00:41 -0000 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