All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: "Li, Xiaoyun" <xiaoyun.li@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Xueming Li <xuemingl@nvidia.com>,
	Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>,
	Andy Moreton <amoreton@xilinx.com>
Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: add command to print representor info
Date: Mon, 11 Oct 2021 16:10:48 +0300	[thread overview]
Message-ID: <1e2e62b9-b62e-3966-e056-234f393f5a16@oktetlabs.ru> (raw)
In-Reply-To: <DM4PR11MB55342C5E2A0DF3EBFE0E179899B59@DM4PR11MB5534.namprd11.prod.outlook.com>

Hi Xiaoyun,

On 10/11/21 11:32 AM, Li, Xiaoyun wrote:
> Hi
> 
>> -----Original Message-----
>> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>> Sent: Wednesday, September 15, 2021 21:48
>> To: Li, Xiaoyun <xiaoyun.li@intel.com>
>> Cc: dev@dpdk.org; Xueming Li <xuemingl@nvidia.com>; Viacheslav Galaktionov
>> <viacheslav.galaktionov@oktetlabs.ru>; Andy Moreton <amoreton@xilinx.com>
>> Subject: [PATCH v3] 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>
>> Reviewed-by: Xueming(Steven) Li <xuemingl@nvidia.com>
>> ---
>> v3:
>>     - change command to "show port info (port_id) representor"
>>
>> v2:
>>     - change output format to log just one line per range
>>
>>  app/test-pmd/cmdline.c | 137
>> +++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 137 insertions(+)
>>
>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
>> 7dd3965d6f..2f24d33337 100644
>> --- a/app/test-pmd/cmdline.c
>> +++ b/app/test-pmd/cmdline.c
>> @@ -162,6 +162,10 @@ static void cmd_help_long_parsed(void *parsed_result,
>>  			"show port (info|stats|summary|xstats|fdir|dcb_tc)
>> (port_id|all)\n"
>>  			"    Display information for port_id, or all.\n\n"
>>
>> +			"show port info (port_id) representor\n"
>> +			"    Show supported representors"
>> +			" for a specific port\n\n"
> 
> Why not just put "    Show supported representors for a specific port\n\n" in one sentence?
> 

Thanks, done in v4.

>> +
>>  			"show port port_id (module_eeprom|eeprom)\n"
>>  			"    Display the module EEPROM or EEPROM
>> information for port_id.\n\n"
>>
>> @@ -7904,6 +7908,138 @@ cmdline_parse_inst_t cmd_showport = {
>>  	},
>>  };
>>
> <snip>
>> +		printf("Controller %d, PF %d", range->controller, range->pf);
>> +
>> +		switch (range->type) {
>> +		case RTE_ETH_REPRESENTOR_NONE:
>> +			printf(", NONE\n");
>> +			break;
>> +		case RTE_ETH_REPRESENTOR_VF:
>> +			if (range_diff > 0) {
>> +				printf(", VF %d..%d\n", range->vf,
>> +				       range->vf + range_diff);
>> +			} else {
>> +				printf(", VF %d\n", range->vf);
>> +			}
> 
> There's no need of braces for this "if else" like others.

Fixed in v4.

> 
> BRs
> Xiaoyun
> 
>> +			break;
>> +		case RTE_ETH_REPRESENTOR_SF:
>> +			printf(", SF %d\n", range->sf);
>> +			break;
>> +		case RTE_ETH_REPRESENTOR_PF:
>> +			if (range_diff > 0)
>> +				printf("..%d\n", range->pf + range_diff);
>> +			else
>> +				printf("\n");
>> +			break;
>> +		default:
>> +			printf(", UNKNOWN TYPE %d\n", range->type);
>> +			break;
>> +		}
>> +	}
>> +
>> +	free(info);
>> +}
>> +
> <snip>
>> --
>> 2.30.2

Many thanks for review notes,
Andrew.

  reply	other threads:[~2021-10-11 13:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  6:39 [dpdk-dev] [PATCH] app/testpmd: add command to print representor info 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
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 [this message]
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=1e2e62b9-b62e-3966-e056-234f393f5a16@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=amoreton@xilinx.com \
    --cc=dev@dpdk.org \
    --cc=viacheslav.galaktionov@oktetlabs.ru \
    --cc=xiaoyun.li@intel.com \
    --cc=xuemingl@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.