[PATCH v2] app/testpmd: avoid mbuf pool memzone name collision

Stephen Hemminger stephen at networkplumber.org
Mon Nov 16 19:44:56 CET 2026


On Mon, 16 Nov 2026 13:25:53 +0200
Mujahed Mohammed <mballas at 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 at dpdk.org
> 
> Signed-off-by: Mujahed Mohammed <mballas at 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.


More information about the dev mailing list