From: Olivier Matz <olivier.matz@6wind.com>
To: Zoltan Kiss <zoltan.kiss@schaman.hu>, dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] mempool: adjust name string size in related data types
Date: Thu, 21 Jul 2016 15:40:44 +0200 [thread overview]
Message-ID: <edb8a833-c1fa-a8c8-f156-d515f67cf3a2@6wind.com> (raw)
In-Reply-To: <1469034999-2732-1-git-send-email-zoltan.kiss@schaman.hu>
Hi Zoltan,
On 07/20/2016 07:16 PM, Zoltan Kiss wrote:
> A recent patch brought up an issue about the size of the 'name' fields:
>
> 85cf0079 mem: avoid memzone/mempool/ring name truncation
>
> These relations should be observed:
>
> 1. Each ring creates a memzone with a prefixed name:
> RTE_RING_NAMESIZE <= RTE_MEMZONE_NAMESIZE - strlen(RTE_RING_MZ_PREFIX)
>
> 2. There are some mempool handlers which create a ring with a prefixed
> name:
> RTE_MEMPOOL_NAMESIZE <= RTE_RING_NAMESIZE - strlen(RTE_MEMPOOL_MZ_PREFIX)
>
> 3. A mempool can create up to RTE_MAX_MEMZONE pre and postfixed memzones:
> sprintf(postfix, "_%d", RTE_MAX_MEMZONE)
> RTE_MEMPOOL_NAMESIZE <= RTE_MEMZONE_NAMESIZE -
> strlen(RTE_MEMPOOL_MZ_PREFIX) - strlen(postfix)
>
> Setting all of them to 32 hides this restriction from the application.
> This patch decreases the mempool and ring string size to accommodate for
> these prefixes, but it doesn't apply the 3rd constraint. Applications
> relying on these constants need to be recompiled, otherwise they'll run
> into ENAMETOOLONG issues.
> The size of the arrays are kept 32 for ABI compatibility, it can be
> decreased next time the ABI changes.
>
> Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
Looks like to be a good compromise for the 16.07 release. One question
however: why not taking in account the 3rd constraint? Because it may
not completly fix the issue if the mempool is fragmented.
We could define RTE_MEMPOOL_NAMESIZE to 24
= 32 - len('mp_') - len('_0123'))
Thanks,
Olivier
next prev parent reply other threads:[~2016-07-21 13:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 14:37 [dpdk-dev] [PATCH] mempool: fix lack of free() registration Zoltan Kiss
2016-07-19 14:37 ` [dpdk-dev] [PATCH] mempool: adjust name string size in related data types Zoltan Kiss
2016-07-19 15:37 ` Olivier Matz
2016-07-19 15:59 ` Zoltan Kiss
2016-07-19 16:17 ` Olivier Matz
2016-07-20 12:41 ` Zoltan Kiss
2016-07-20 13:37 ` Olivier Matz
2016-07-20 14:01 ` Richardson, Bruce
2016-07-20 17:20 ` Zoltan Kiss
2016-07-20 17:16 ` [dpdk-dev] [PATCH v2] " Zoltan Kiss
2016-07-21 13:40 ` Olivier Matz [this message]
2016-07-21 13:47 ` Zoltan Kiss
2016-07-21 14:25 ` Olivier Matz
2016-07-21 21:16 ` Thomas Monjalon
2016-07-19 15:26 ` [dpdk-dev] [PATCH] mempool: fix lack of free() registration Olivier Matz
2016-07-19 16:17 ` Zoltan Kiss
2016-07-20 17:14 ` [dpdk-dev] [PATCH v2] mempool: fix lack of free registration Zoltan Kiss
2016-07-21 21:04 ` 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=edb8a833-c1fa-a8c8-f156-d515f67cf3a2@6wind.com \
--to=olivier.matz@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=zoltan.kiss@schaman.hu \
/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).