From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>, <ferruh.yigit@amd.com>,
Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>
Cc: <dev@dpdk.org>
Subject: [PATCH v2] app/testpmd: dump private info in 'show port info'
Date: Thu, 16 Mar 2023 09:32:16 +0000 [thread overview]
Message-ID: <20230316093216.18516-1-fengchengwen@huawei.com> (raw)
In-Reply-To: <20230314115035.33356-1-fengchengwen@huawei.com>
This patch adds dump private info in 'show port info [port_id]' cmd.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
v2: add identify ENOTSUP retcode according Thomas's comment.
---
app/test-pmd/config.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 018536f177..22b88c67b9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -938,6 +938,13 @@ port_infos_display(portid_t port_id)
printf("unknown\n");
break;
}
+ printf("Device private info:\n");
+ ret = rte_eth_dev_priv_dump(port_id, stdout);
+ if (ret == -ENOTSUP)
+ printf(" none\n");
+ else if (ret < 0)
+ fprintf(stderr, " Failed to dump private info with error (%d): %s\n",
+ ret, strerror(-ret));
}
void
--
2.17.1
next prev parent reply other threads:[~2023-03-16 9:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 11:50 [PATCH] app/testpmd: support dump ethdev private cmd Chengwen Feng
2023-03-14 13:45 ` Ferruh Yigit
2023-03-15 2:02 ` fengchengwen
2023-03-15 2:33 ` [PATCH] app/testpmd: dump private info in 'show port info' Chengwen Feng
2023-03-15 8:28 ` Singh, Aman Deep
2023-03-15 10:12 ` Ferruh Yigit
2023-03-16 1:10 ` fengchengwen
2023-03-16 7:55 ` Thomas Monjalon
2023-03-16 9:39 ` fengchengwen
2023-03-16 9:19 ` Dmitry Kozlyuk
2023-03-16 9:43 ` fengchengwen
2023-03-16 10:46 ` Ferruh Yigit
2023-03-16 15:16 ` Thomas Monjalon
2023-03-16 9:32 ` Chengwen Feng [this message]
2023-03-16 11:42 ` [PATCH v2] " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230316093216.18516-1-fengchengwen@huawei.com \
--to=fengchengwen@huawei.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=thomas@monjalon.net \
--cc=yuying.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).