From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: David Marchand <david.marchand@redhat.com>,
Dmitry Kozlyuk <dkozlyuk@nvidia.com>,
Ray Kinsella <mdr@ashroe.eu>,
Stephen Hemminger <stephen@networkplumber.org>,
dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH] mempool: accept user flags only
Date: Mon, 18 Oct 2021 12:05:50 +0300 [thread overview]
Message-ID: <8d96bea0-abeb-090a-6589-62bd082bb7ca@oktetlabs.ru> (raw)
In-Reply-To: <YW03RxCwKu7A85wm@platinum>
On 10/18/21 11:58 AM, Olivier Matz wrote:
> On Mon, Oct 18, 2021 at 11:37:32AM +0300, Andrew Rybchenko wrote:
>> On 10/18/21 11:26 AM, David Marchand wrote:
>>> As reported by Dmitry, MEMPOOL_F_POOL_CREATED is a flag only manipulated
>>> internally.
>>> This flag is not supposed to be requested from an application and would
>>> probably result in an incorrect behavior if an application did pass it.
>>>
>>> Other internal flags may be introduced later.
>>>
>>> Rework the check and export a mask of valid user flags for use in the
>>> unit test.
>>>
>>> Fixes: b240af8b10f9 ("mempool: enforce valid flags at creation")
>>>
>>> Reported-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
>>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> (...)
>
>>> --- a/lib/mempool/rte_mempool.h
>>> +++ b/lib/mempool/rte_mempool.h
>>> @@ -258,6 +258,15 @@ struct rte_mempool {
>>> #define MEMPOOL_F_POOL_CREATED 0x0010 /**< Internal: pool is created. */
>>> #define MEMPOOL_F_NO_IOVA_CONTIG 0x0020 /**< Don't need IOVA contiguous objs. */
>>>
>>> +/**
>>> + * This macro lists all the mempool flags an application may request.
>>> + */
>>> +#define MEMPOOL_VALID_USER_FLAGS (MEMPOOL_F_NO_SPREAD \
>>
>> I think RTE_ prefix is missing here since it is in a public
>> header now.
>
> I discussed about this offline with David. I was ok to omit the
> RTE_ prefix for consistency.
>
>>> + | MEMPOOL_F_NO_CACHE_ALIGN \
>>> + | MEMPOOL_F_SP_PUT \
>>> + | MEMPOOL_F_SC_GET \
>>> + | MEMPOOL_F_NO_IOVA_CONTIG \
>>> + )
>>> /**
>>> * @internal When debug is enabled, store some statistics.
>>> *
>>>
>>
>> Should we make a patch to add defines with RTE_ prefix and
>> add a deprecation for old flags without RTE_ prefix?
>>
>> Olivier, what do you think? If you have time to care about it,
>> it would be great. (I'm unfamiliar with coccinelle yet).
>
> I was joking with David about keeping some work for 2022 :)
>
> I will try to have a look. As a side note, I was not that convinced by
> coccinelle for simple replacements like this, because it does not
> update the comments or documentation, it can (rarely) break the
> indentation, it is slow, and the syntax is quite complex.
>
I dreamed to finish with renanamings in core libraries in 2021.
May be it is to naive :(
I see that rc1 is already delayed and adding a couple of
more patches could delay it even more. I'm ready to do it
without coccinelle today, so, it is a question to @Thomas and
@David if that late patch will be considered at all.
next prev parent reply other threads:[~2021-10-18 9:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 8:26 David Marchand
2021-10-18 8:35 ` Olivier Matz
2021-10-20 7:53 ` David Marchand
2021-10-18 8:37 ` Andrew Rybchenko
2021-10-18 8:58 ` Olivier Matz
2021-10-18 9:05 ` Andrew Rybchenko [this message]
2021-10-18 12:06 ` David Marchand
2021-10-18 14:51 ` Andrew Rybchenko
2021-10-19 13:42 ` David Marchand
2021-10-19 18:17 ` Andrew Rybchenko
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=8d96bea0-abeb-090a-6589-62bd082bb7ca@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dkozlyuk@nvidia.com \
--cc=mdr@ashroe.eu \
--cc=olivier.matz@6wind.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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).