Skip to content

app/testpmd: fix socket id handling with NUMA disabled

Stephen Hemminger dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4app/testpmd: fix port socket ID with NUMA disabledapp/test-pmd/testpmd.c+17 -100 replies
2/4app/testpmd: consolidate port socket ID computationapp/test-pmd/testpmd.c+28 -410 replies
3/4app/testpmd: display any socket ID as textapp/test-pmd/cmdline.c app/test-pmd/config.c app/test-pmd/testpmd.c +1 more+45 -180 replies
4/4app/testpmd: report reason when queue setup command failsapp/test-pmd/cmdline.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] app/testpmd: fix socket id handling with NUMA disabled

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(-)
Signature · 1 line
2.53.0