DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xueming(Steven) Li" <xuemingl@nvidia.com>
To: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Xiaoyun Li <xiaoyun.li@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Andy Moreton <amoreton@xilinx.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add command to print representor info
Date: Sat, 28 Aug 2021 13:28:49 +0000	[thread overview]
Message-ID: <DM4PR12MB53730757934D70D82D9C60ABA1C99@DM4PR12MB5373.namprd12.prod.outlook.com> (raw)
In-Reply-To: <c3825c627f1343347a0f279db82a581f@oktetlabs.ru>



> -----Original Message-----
> From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
> Sent: Friday, August 27, 2021 5:21 PM
> To: Xueming(Steven) Li <xuemingl@nvidia.com>
> Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Xiaoyun Li <xiaoyun.li@intel.com>; dev@dpdk.org; Andy Moreton
> <amoreton@xilinx.com>
> Subject: Re: [PATCH] app/testpmd: add command to print representor info
> 
> On 2021-08-27 11:20, Xueming(Steven) Li wrote:
> > Thanks for getting this feature more complete!
> >
> >> -----Original Message-----
> >> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> >> Sent: Friday, August 27, 2021 2:40 PM
> >> To: Xiaoyun Li <xiaoyun.li@intel.com>
> >> Cc: dev@dpdk.org; Xueming(Steven) Li <xuemingl@nvidia.com>;
> >> Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>; Andy
> >> Moreton <amoreton@xilinx.com>
> >> Subject: [PATCH] app/testpmd: add command to print representor info
> >>
> >> From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
> >>
> >> Make it simpler to debug configurations and code related to the
> >> representor info API.
> >>
> >> Signed-off-by: Viacheslav Galaktionov
> >> <viacheslav.galaktionov@oktetlabs.ru>
> >> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> >> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
> >> ---
> >>  app/test-pmd/cmdline.c | 117
> >> +++++++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 117 insertions(+)
> >>
> >> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> >> 82253bc751..49e6e63471 100644
> >> --- a/app/test-pmd/cmdline.c
> >> +++ b/app/test-pmd/cmdline.c
> >> @@ -236,6 +236,10 @@ static void cmd_help_long_parsed(void
> >> *parsed_result,
> >>  			"    Show port supported ptypes"
> >>  			" for a specific port\n\n"
> >>
> >> +			"show port (port_id) representors\n"
> >> +			"    Show supported representors"
> >> +			" for a specific port\n\n"
> >
> > Confusing name, code below shows representor info, not probed
> > representor devices.
> > How about "show port (port_id) representor info"?
> 
> That's a good point, thank you!
> 
> [snip]
> 
> >> +static void
> >> +cmd_representor_info_parsed(void *parsed_result,
> >> +		__rte_unused struct cmdline *cl,
> >> +		__rte_unused void *data)
> >> +{
> >> +	struct cmd_representor_info_result *res = parsed_result;
> >> +	struct rte_eth_representor_info *info;
> >> +	uint32_t i;
> >> +	int ret;
> >> +	int num;
> >> +
> >> +	if (!rte_eth_dev_is_valid_port(res->cmd_pid)) {
> >
> > Seems port "all" not supported, is there a check?
> 
> What kind of check do you mean?
> I suppose support for "all" can be added. In such a case, testpmd can go over all available ports that aren't representors and print
> their representor info.
> Does this sound good to you?

Sorry, "all" will not pass the check, please ignore my comment.
Dump a single port is good enough.

> 
> [snip]
> 
> >> +	printf("Port controller: %hu\n", info->controller);
> >> +	printf("Port PF: %hu\n", info->pf);
> >> +	printf("Ranges: %u\n", info->nb_ranges);
> >> +	for (i = 0; i < info->nb_ranges; i++) {
> >> +		printf("%u:\n", i);
> >
> > Normally there will be certain amount of ranges here, how about output
> > as a table?
> 
> I'm not sure what the layout of this table should be, could you provide an example?

Range entry fields is dump in vertical here, how about dump range entry as a row? No need to align columns.

> 
> [snip]

  reply	other threads:[~2021-08-28 13:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  6:39 Andrew Rybchenko
2021-08-27  7:28 ` Li, Xiaoyun
2021-08-27  8:20 ` Xueming(Steven) Li
2021-08-27  9:20   ` Viacheslav Galaktionov
2021-08-28 13:28     ` Xueming(Steven) Li [this message]
2021-08-31 16:12 ` [dpdk-dev] [PATCH v2] " Andrew Rybchenko
2021-09-02 12:33   ` Xueming(Steven) Li
2021-09-14 15:52   ` Ferruh Yigit
2021-09-14 16:17     ` Andrew Rybchenko
2021-09-14 16:36       ` Ferruh Yigit
2021-09-15 13:50         ` Andrew Rybchenko
2021-09-15 13:47 ` [dpdk-dev] [PATCH v3] " Andrew Rybchenko
2021-09-28  0:55   ` Ajit Khaparde
2021-10-11  8:32   ` Li, Xiaoyun
2021-10-11 13:10     ` Andrew Rybchenko
2021-10-11 13:08 ` [dpdk-dev] [PATCH v4] " Andrew Rybchenko
2021-10-12  1:50   ` Li, Xiaoyun
2021-10-12 17:06     ` 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=DM4PR12MB53730757934D70D82D9C60ABA1C99@DM4PR12MB5373.namprd12.prod.outlook.com \
    --to=xuemingl@nvidia.com \
    --cc=amoreton@xilinx.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=viacheslav.galaktionov@oktetlabs.ru \
    --cc=xiaoyun.li@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).