DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: Zoltan Kiss <zoltan.kiss@schaman.hu>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] mempool: adjust name string size in related data types
Date: Tue, 19 Jul 2016 17:37:28 +0200	[thread overview]
Message-ID: <600cac7d-b0aa-7919-93f2-7a396ef7b3ea@6wind.com> (raw)
In-Reply-To: <1468939061-19734-2-git-send-email-zoltan.kiss@schaman.hu>

Hi Zoltan,

On 07/19/2016 04:37 PM, Zoltan Kiss wrote:
> A recent fix brought up an issue about the size of the 'name' fields:
> 
> 85cf0079 mem: avoid memzone/mempool/ring name truncation
> 
> These relations should be observed:
> 
> RTE_RING_NAMESIZE <= RTE_MEMZONE_NAMESIZE - strlen(RTE_RING_MZ_PREFIX)
> RTE_MEMPOOL_NAMESIZE <= RTE_RING_NAMESIZE - strlen(RTE_MEMPOOL_MZ_PREFIX)
> 
> Setting all of them to 32 hides this restriction from the application.
> This patch increases the memzone string size to accomodate for these
> prefixes, and the same happens with the ring name string. The ABI needs to
> be broken to fix this API issue, this way doesn't break applications
> previously not failing due to the truncating bug now fixed.
> 
> Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>

I agree it is a problem for an application because it cannot know what
is the maximum name length. On the other hand, breaking the ABI for this
looks a bit overkill. Maybe we could reduce RTE_MEMPOOL_NAMESIZE and
RTE_RING_NAMESIZE instead of increasing RTE_MEMZONE_NAMESIZE? That way,
we could keep the ABI as is.

It would even be better to get rid of this static char[] for the
structure names and replace it by an allocated const char *. I didn't
check it's feasible for memzones. What do you think?

In any case, I think it's a bit late for 16.07 for this kind of fix.

Regards,
Olivier

  reply	other threads:[~2016-07-19 15:37 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 [this message]
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
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=600cac7d-b0aa-7919-93f2-7a396ef7b3ea@6wind.com \
    --to=olivier.matz@6wind.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).