[PATCH 4/4] app/testpmd: report reason when queue setup command fails
Stephen Hemminger
stephen at networkplumber.org
Thu Jul 2 18:10:14 CEST 2026
The interactive "port <id> rxq|txq <id> setup" command printed a
bare failure message. rte_eth_rx/tx_queue_setup() can fail with
-EBUSY without logging anything, for example when the port is
started and the PMD does not support runtime queue setup, leaving
the user with no clue:
testpmd> port 0 rxq 0 setup
Failed to setup RX queue
Print the error string:
Failed to setup RX queue: Device or resource busy
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
app/test-pmd/cmdline.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index bb62778a26..e0dcdc1193 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3092,7 +3092,8 @@ cmd_setup_rxtx_queue_parsed(
&port->rxq[res->qid].conf,
mp);
if (ret)
- fprintf(stderr, "Failed to setup RX queue\n");
+ fprintf(stderr, "Failed to setup RX queue: %s\n",
+ rte_strerror(-ret));
} else {
socket_id = txring_numa[res->portid];
if (!numa_support || socket_id == NUMA_NO_CONFIG)
@@ -3109,7 +3110,8 @@ cmd_setup_rxtx_queue_parsed(
socket_id,
&port->txq[res->qid].conf);
if (ret)
- fprintf(stderr, "Failed to setup TX queue\n");
+ fprintf(stderr, "Failed to setup TX queue: %s\n",
+ rte_strerror(-ret));
}
}
--
2.53.0
More information about the dev
mailing list