DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: log reason of port start failure
@ 2021-03-11 10:48 Andrew Rybchenko
  2021-03-12  1:49 ` Li, Xiaoyun
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Rybchenko @ 2021-03-11 10:48 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: dev

Provide a bit more diagnostics information when port start fails.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 app/test-pmd/testpmd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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),
-- 
2.30.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-12 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 10:48 [dpdk-dev] [PATCH] app/testpmd: log reason of port start failure Andrew Rybchenko
2021-03-12  1:49 ` Li, Xiaoyun
2021-03-12 14:35   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).