From: Olivier MATZ <olivier.matz@6wind.com>
To: "Wiles, Keith" <keith.wiles@intel.com>,
"Richardson, Bruce" <bruce.richardson@intel.com>,
Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] mempool: rename functions with confusing names
Date: Wed, 29 Jun 2016 18:05:23 +0200 [thread overview]
Message-ID: <5773F1C3.901@6wind.com> (raw)
In-Reply-To: <4BCAFD5E-AB9D-4E82-A2FD-34FBEDC796BC@intel.com>
On 06/29/2016 06:02 PM, Wiles, Keith wrote:
>
> On 6/29/16, 11:00 AM, "dev on behalf of Bruce Richardson" <dev-bounces@dpdk.org on behalf of bruce.richardson@intel.com> 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
next prev parent reply other threads:[~2016-06-29 16:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 13:55 Bruce Richardson
2016-06-29 15:55 ` Thomas Monjalon
2016-06-29 16:00 ` Bruce Richardson
2016-06-29 16:02 ` Wiles, Keith
2016-06-29 16:05 ` Olivier MATZ [this message]
2016-06-29 16:19 ` Richardson, Bruce
2016-06-29 16:27 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2016-06-29 16:30 ` Bruce Richardson
2016-06-30 12:00 ` Thomas Monjalon
2016-06-30 12:02 ` Panu Matilainen
2016-06-30 12:09 ` Bruce Richardson
2016-06-30 12:08 ` Bruce Richardson
2016-06-30 12:49 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
2016-06-30 20:05 ` Thomas Monjalon
2016-07-01 8:57 ` Olivier MATZ
2016-07-01 10:21 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5773F1C3.901@6wind.com \
--to=olivier.matz@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=keith.wiles@intel.com \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).