From: Andrew Rybchenko Date: Thu, 11 Mar 2021 10:48:35 +0000 (+0300) Subject: app/testpmd: log reason of port start failure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=52f2c6f2598d19624a5f40d13be37c0701c26075;p=dpdk.git app/testpmd: log reason of port start failure Provide a bit more diagnostics information when port start fails. Signed-off-by: Andrew Rybchenko Acked-by: Xiaoyun Li --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 98c3248c01..96d2e0fcec 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2626,8 +2626,10 @@ start_port(portid_t pid) cnt_pi++; /* start port */ - if (rte_eth_dev_start(pi) < 0) { - printf("Fail to start port %d\n", pi); + diag = rte_eth_dev_start(pi); + if (diag < 0) { + printf("Fail to start port %d: %s\n", pi, + rte_strerror(-diag)); /* Fail to setup rx queue, return */ if (rte_atomic16_cmpset(&(port->port_status),