DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Yang, Qiming" <qiming.yang@intel.com>
To: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities	query
Date: Fri, 13 Jan 2017 09:40:25 +0000	[thread overview]
Message-ID: <F5DF4F0E3AFEF648ADC1C3C33AD4DBF16EDCC046@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <E115CCD9D858EF4F90C690B0DCB4D897476C3A8E@IRSMSX108.ger.corp.intel.com>

Hi, Pablo

-----Original Message-----
From: De Lara Guarch, Pablo 
Sent: Friday, January 13, 2017 4:43 PM
To: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org
Cc: Yang, Qiming <qiming.yang@intel.com>
Subject: RE: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query

Hi Qiming,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang
> Sent: Thursday, January 12, 2017 3:26 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming
> Subject: [dpdk-dev] [PATCH v5] app/testpmd: supported offload 
> capabilities query
> 
> Add two new commands "show port cap <port>" and "show port cap all"to 
> diaplay what offload capabilities supported in ports. It will not only 
> display all the capabilities of the port, but also the enabling 
> condition for each capability in the running time.
> 
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
> Acked-by: Beilei Xing <beilei.xing@intel.com>
> ---
> v2 changes:
> * fixed the output style as Ferruh's patch show and add some
>   description in docs for new functions.
> v3 changes:
> * add new command in cmd_help_long_parsed.
> v4 changes:
> * use 'cap' instead of 'capa'.
> v5 changes:
> * rebased, fixed the inappropriate expression and adjusted the
>   output order.
> ---
> ---
>  app/test-pmd/cmdline.c                      |  17 ++-
>  app/test-pmd/config.c                       | 175
> ++++++++++++++++++++++++++++
>  app/test-pmd/testpmd.h                      |   1 +
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  12 +-
>  4 files changed, 195 insertions(+), 10 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 
> 4e8b0d8..6fa1783 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c

...

>  cmdline_parse_token_string_t cmd_showportall_show = @@ -5821,13 
> +5824,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
>  	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, 
> "port");  cmdline_parse_token_string_t cmd_showportall_what =
>  	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
> -
> "info#stats#xstats#fdir#stat_qmap#dcb_tc");
> +
> "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
>  cmdline_parse_token_string_t cmd_showportall_all =
>  	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");  
> cmdline_parse_inst_t cmd_showportall = {
>  	.f = cmd_showportall_parsed,
>  	.data = NULL,
> -	.help_str = "show|clear port
> info|stats|xstats|fdir|stat_qmap|dcb_tc all",
> +	.help_str = "show|clear port"

Missing space after "port"

> +	"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
>  	.tokens = {
>  		(void *)&cmd_showportall_show,
>  		(void *)&cmd_showportall_port,
> @@ -5867,6 +5871,8 @@ static void cmd_showport_parsed(void 
> *parsed_result,
>  		nic_stats_mapping_display(res->portnum);
>  	else if (!strcmp(res->what, "dcb_tc"))
>  		port_dcb_info_display(res->portnum);
> +	else if (!strcmp(res->what, "cap"))
> +		port_offload_cap_display(res->portnum);
>  }
> 
>  cmdline_parse_token_string_t cmd_showport_show = @@ -5876,14 +5882,15 
> @@ cmdline_parse_token_string_t cmd_showport_port =
>  	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");  
> cmdline_parse_token_string_t cmd_showport_what =
>  	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
> -
> "info#stats#xstats#fdir#stat_qmap#dcb_tc");
> +
> "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
>  cmdline_parse_token_num_t cmd_showport_portnum =
>  	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8);
> 
>  cmdline_parse_inst_t cmd_showport = {
>  	.f = cmd_showport_parsed,
>  	.data = NULL,
> -	.help_str = "show|clear port
> info|stats|xstats|fdir|stat_qmap|dcb_tc "
> +	.help_str = "show|clear port"

Missing space after "port".
Also, add a tab in the following line to be consistent with the help_str of the next command.

> +		"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap "
>  		"<port_id>",
>  	.tokens = {
>  		(void *)&cmd_showport_show,
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 
> 617e6d4..8a2ef56 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c

...

> +
> +	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
> +		printf("RX TCP checksum:               ");
> +		if (dev->data->dev_conf.rxmode.hw_ip_checksum)
> +			printf("on\n");
> +		else
> +			printf("off\n");
> +	}
> +
> +	if (dev_info.rx_offload_capa &
> DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)
> +		printf("RX Outer IPv4 checksum:        ");

Missing on/off?
Qiming: I didn't find any switch for this feature in DPDK now. I'll fix the format problem. Thank you.
> +
> +	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) {
> +		printf("Large receive offload:         ");
> +		if (dev->data->dev_conf.rxmode.enable_lro)
> +			printf("on\n");
> +		else
> +			printf("off\n");
> +	}

Thanks for this nice patch.

Pablo

  reply	other threads:[~2017-01-13  9:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 11:31 [dpdk-dev] [PATCH] " Qiming Yang
2016-12-02 11:40 ` Mcnamara, John
2016-12-02 11:42   ` Mcnamara, John
2016-12-06  7:07 ` [dpdk-dev] [PATCH v2] " Qiming Yang
2016-12-20  5:50   ` Wu, Jingjing
2016-12-21  2:20   ` [dpdk-dev] [PATCH v3] " Qiming Yang
2016-12-21  2:37     ` Yuanhan Liu
2016-12-21 11:09       ` Yang, Qiming
2016-12-23  9:31     ` [dpdk-dev] [PATCH v4] " Qiming Yang
2016-12-26  1:21       ` Wu, Jingjing
2016-12-27  8:18       ` Xing, Beilei
2016-12-27  9:40         ` Yang, Qiming
2016-12-27  9:47       ` Xing, Beilei
2017-01-12  3:26       ` [dpdk-dev] [PATCH v5] " Qiming Yang
2017-01-13  8:43         ` De Lara Guarch, Pablo
2017-01-13  9:40           ` Yang, Qiming [this message]
2017-01-13 12:35             ` De Lara Guarch, Pablo
2017-01-14  3:06               ` Yang, Qiming
2017-01-16  2:00                 ` Yang, Qiming
2017-01-13 12:17         ` [dpdk-dev] [PATCH v6] " Qiming Yang
2017-01-16  2:31           ` [dpdk-dev] [PATCH v7] " Qiming Yang
2017-01-16 10:10             ` De Lara Guarch, Pablo
2017-01-30 15:59               ` Thomas Monjalon

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=F5DF4F0E3AFEF648ADC1C3C33AD4DBF16EDCC046@SHSMSX101.ccr.corp.intel.com \
    --to=qiming.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@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).