DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Mujahed Mohammed <mballas@nvidia.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>,
	Thomas Monjalon <thomas@monjalon.net>,
	Aman Singh <aman.deep.singh@intel.com>,
	"Viacheslav Ovsiienko" <viacheslavo@nvidia.com>
Subject: Re: [PATCH v2] app/testpmd: avoid mbuf pool memzone name collision
Date: Mon, 16 Nov 2026 10:44:56 -0800	[thread overview]
Message-ID: <20261116104456.1092a4c7@phoenix.local> (raw)
In-Reply-To: <20261116112556.535445-1-mballas@nvidia.com>

On Mon, 16 Nov 2026 13:25:53 +0200
Mujahed Mohammed <mballas@nvidia.com> wrote:

> Additional mbuf pools append a numeric size index to the base pool
> name. Mempool backing chunks also append a numeric chunk index. If
> the base pool needs multiple chunks, its chunk name can therefore
> match the metadata memzone name of an additional pool.
> 
> Add an s marker before additional pool size indexes to keep the two
> namespaces distinct while retaining the original index-zero pool
> name.
> 
> Fixes: 26cbb4191e91 ("app/testpmd: add multiple pools per core creation")
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Mujahed Mohammed <mballas@nvidia.com>
> ---

Looks ok, but I like the AI suggestion to fix it in mempoll code
not just in testpmd.

---

The collision is not testpmd specific. rte_mempool_populate_default()
names chunks MP_<name>_<id>, which shares a namespace with the pool
metadata memzone MP_<name>. Any application with pools "foo" and
"foo_1" can hit this once "foo" spans more than one chunk.

Please fix it in lib/mempool instead, e.g. use a distinct prefix of
the same length for chunk memzones ("MC_%s_%u"). Nothing looks up
chunk memzones by name, and the name length budget is unchanged.

Also please add the reproduction (command line and memory setup that
forces multiple chunks) to the commit message.

Minor: braces around the else body if a comment is added there, and
no blank line between Fixes: and Cc: stable.

  reply	other threads:[~2026-11-16 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 15:03 [PATCH] app/testpmd: avoid mbuf pool memzone name collision Mujahed Mohammed
2026-11-16 11:25 ` [PATCH v2] " Mujahed Mohammed
2026-11-16 18:44   ` Stephen Hemminger [this message]
2026-11-17 19:34 ` [PATCH v3] mempool: avoid " Mujahed Mohammed

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=20261116104456.1092a4c7@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=mballas@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.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