DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 0/4] app/testpmd: fix socket id handling with NUMA disabled
Date: Thu,  2 Jul 2026 09:10:10 -0700	[thread overview]
Message-ID: <20260702161244.363233-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20260702130729.26577-1-mkashani@nvidia.com>

Alternative to the patch "app/testpmd: fix multi-pool Rx setup with --no-NUMA"
from Maayan Kashani, fixing the problem at the source
rather than remapping inside mbuf_pool_find().

Since commit 835fd4893a31 ("app/testpmd: support cross-NUMA allocations"),
mbuf pools are created (and named) on SOCKET_ID_ANY
when NUMA support is disabled, but port->socket_id still holds 0/--socket-num.
Every name-based pool lookup that does not go through the single workaround in
start_port() misses. The reported multi-pool Rx failure is one instance; plain
"testpmd --no-numa --forward-mode=txonly" also crashes with a NULL
mempool dereference, and --socket-num no longer affects pool allocation.

Patch 1 restores the invariant that port->socket_id equals the
socket id the pools are created and named with, and removes the
start_port() workaround. It should go to stable (the regression
shipped in 25.07 and 25.11); it cherry-picks onto 25.11 with
trivial context conflicts and was build- and run-tested there.

Patch 2 consolidates the three diverging copies of the port socket
id policy into one helper; this also fixes hot-attached ports
ignoring --port-numa-config, --no-numa and --socket-num.

Patch 3 prints SOCKET_ID_ANY as "any" instead of 4294967295.

Patch 4 adds the error string to the interactive queue setup
command failure message; rte_eth_rx/tx_queue_setup() can return
-EBUSY silently when the port is started and the PMD lacks
runtime queue setup support.

Stephen Hemminger (4):
  app/testpmd: fix port socket ID with NUMA disabled
  app/testpmd: consolidate port socket ID computation
  app/testpmd: display any socket ID as text
  app/testpmd: report reason when queue setup command fails

 app/test-pmd/cmdline.c |  12 +++--
 app/test-pmd/config.c  |  18 ++++---
 app/test-pmd/testpmd.c | 120 +++++++++++++++++++++--------------------
 app/test-pmd/testpmd.h |  11 ++++
 4 files changed, 92 insertions(+), 69 deletions(-)

-- 
2.53.0


  reply	other threads:[~2026-07-02 16:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 13:07 [PATCH] app/testpmd: fix multi-pool Rx setup with --no-NUMA Maayan Kashani
2026-07-02 16:10 ` Stephen Hemminger [this message]
2026-07-02 16:10   ` [PATCH 1/4] app/testpmd: fix port socket ID with NUMA disabled Stephen Hemminger
2026-07-02 16:10   ` [PATCH 2/4] app/testpmd: consolidate port socket ID computation Stephen Hemminger
2026-07-02 16:10   ` [PATCH 3/4] app/testpmd: display any socket ID as text Stephen Hemminger
2026-07-02 16:10   ` [PATCH 4/4] app/testpmd: report reason when queue setup command fails Stephen Hemminger

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=20260702161244.363233-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /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