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 via email to