From: Ferruh Yigit <ferruh.yigit@amd.com>
To: <reshma.pattan@intel.com>, Maryam Tahhan <mtahhan@redhat.com>
Cc: <stephen@networkplumber.org>, <thomas@monjalon.net>,
<dev@dpdk.org>, "Min Hu (Connor)" <humin29@huawei.com>
Subject: Re: [PATCH v2] app/procinfo: add devcie private info dump
Date: Mon, 23 May 2022 09:43:03 +0100 [thread overview]
Message-ID: <c7f95fcc-f17f-f31d-2de6-cdd188249987@amd.com> (raw)
In-Reply-To: <d0499ed6-a6eb-b1e1-2cbe-ad8fd2b06580@huawei.com>
On 5/21/2022 7:54 AM, Min Hu (Connor) wrote:
> CAUTION: This message has originated from an External Source. Please use
> proper judgment and caution when opening attachments, clicking links, or
> responding to this email.
>
>
> Hi, Ferruh,
> what do you think of this patch?
>
Hi Connor,
Maryam & Reshma are maintainers of the tool, both are cc'ed.
>
> 在 2022/2/21 10:24, Min Hu (Connor) 写道:
>> This patch adds support for dump the device private info from a running
>> application. It can help developers locate the problem.
>>
>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>> ---
>> v2:
>> * fix way of handling ports.
>> ---
>> app/proc-info/main.c | 28 ++++++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>>
>> diff --git a/app/proc-info/main.c b/app/proc-info/main.c
>> index 56070a3317..accb5e716d 100644
>> --- a/app/proc-info/main.c
>> +++ b/app/proc-info/main.c
>> @@ -84,6 +84,8 @@ static char bdr_str[MAX_STRING_LEN];
>>
>> /**< Enable show port. */
>> static uint32_t enable_shw_port;
>> +/**< Enable show port private info. */
>> +static uint32_t enable_shw_port_priv;
>> /**< Enable show tm. */
>> static uint32_t enable_shw_tm;
>> /**< Enable show crypto. */
>> @@ -123,6 +125,7 @@ proc_info_usage(const char *prgname)
>> " --collectd-format: to print statistics to STDOUT in
>> expected by collectd format\n"
>> " --host-id STRING: host id used to identify the system
>> process is running on\n"
>> " --show-port: to display ports information\n"
>> + " --show-port-private: to display ports private
>> information\n"
>> " --show-tm: to display traffic manager information for
>> ports\n"
>> " --show-crypto: to display crypto information\n"
>> " --show-ring[=name]: to display ring information\n"
>> @@ -232,6 +235,7 @@ proc_info_parse_args(int argc, char **argv)
>> {"xstats-ids", 1, NULL, 1},
>> {"host-id", 0, NULL, 0},
>> {"show-port", 0, NULL, 0},
>> + {"show-port-private", 0, NULL, 0},
>> {"show-tm", 0, NULL, 0},
>> {"show-crypto", 0, NULL, 0},
>> {"show-ring", optional_argument, NULL, 0},
>> @@ -284,6 +288,9 @@ proc_info_parse_args(int argc, char **argv)
>> else if (!strncmp(long_option[option_index].name,
>> "show-port", MAX_LONG_OPT_SZ))
>> enable_shw_port = 1;
>> + else if (!strncmp(long_option[option_index].name,
>> + "show-port-private",
>> MAX_LONG_OPT_SZ))
>> + enable_shw_port_priv = 1;
>> else if (!strncmp(long_option[option_index].name,
>> "show-tm", MAX_LONG_OPT_SZ))
>> enable_shw_tm = 1;
>> @@ -887,6 +894,25 @@ show_port(void)
>> }
>> }
>>
>> +static void
>> +show_port_private_info(void)
>> +{
>> + int i;
>> +
>> + snprintf(bdr_str, MAX_STRING_LEN, " show - Port PMD Private ");
>> + STATS_BDR_STR(10, bdr_str);
>> +
>> + RTE_ETH_FOREACH_DEV(i) {
>> + /* Skip if port is not in mask */
>> + if ((enabled_port_mask & (1ul << i)) == 0)
>> + continue;
>> +
>> + snprintf(bdr_str, MAX_STRING_LEN, " Port %u ", i);
>> + STATS_BDR_STR(5, bdr_str);
>> + rte_eth_dev_priv_dump(i, stdout);
>> + }
>> +}
>> +
>> static void
>> display_nodecap_info(int is_leaf, struct rte_tm_node_capabilities *cap)
>> {
>> @@ -1549,6 +1575,8 @@ main(int argc, char **argv)
>> /* show information for PMD */
>> if (enable_shw_port)
>> show_port();
>> + if (enable_shw_port_priv)
>> + show_port_private_info();
>> if (enable_shw_tm)
>> show_tm();
>> if (enable_shw_crypto)
>>
next prev parent reply other threads:[~2022-05-23 8:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-19 1:59 [PATCH] app/procinfo: add device " Min Hu (Connor)
2022-02-20 1:04 ` Stephen Hemminger
2022-02-20 8:56 ` Thomas Monjalon
2022-02-21 2:26 ` Min Hu (Connor)
2022-02-21 17:04 ` Stephen Hemminger
2022-02-22 0:40 ` Min Hu (Connor)
2022-02-21 2:24 ` [PATCH v2] app/procinfo: add devcie " Min Hu (Connor)
2022-04-07 8:09 ` Min Hu (Connor)
2022-04-18 1:11 ` Min Hu (Connor)
2022-04-25 6:44 ` Min Hu (Connor)
2022-05-21 6:54 ` Min Hu (Connor)
2022-05-23 8:43 ` Ferruh Yigit [this message]
2022-05-25 14:33 ` Pattan, Reshma
2022-05-26 6:01 ` Min Hu (Connor)
2022-05-26 1:10 ` [PATCH v3] app/procinfo: add device " Min Hu (Connor)
2022-06-02 6:22 ` Min Hu (Connor)
2022-06-06 14:39 ` [PATCH v4] " Dongdong Liu
2022-06-13 12:45 ` Dongdong Liu
2022-06-13 12:51 ` Dongdong Liu
2022-06-26 15:50 ` Thomas Monjalon
2022-07-02 8:22 ` Dongdong Liu
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=c7f95fcc-f17f-f31d-2de6-cdd188249987@amd.com \
--to=ferruh.yigit@amd.com \
--cc=dev@dpdk.org \
--cc=humin29@huawei.com \
--cc=mtahhan@redhat.com \
--cc=reshma.pattan@intel.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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).