DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Kirill Rybalchenko <kirill.rybalchenko@intel.com>, dev@dpdk.org
Cc: andrey.chilikin@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types
Date: Wed, 20 Sep 2017 12:19:11 +0100	[thread overview]
Message-ID: <4e0446b7-f372-41ca-1d13-dd1a5a881242@intel.com> (raw)
In-Reply-To: <1504283001-54863-1-git-send-email-kirill.rybalchenko@intel.com>

On 9/1/2017 5:23 PM, Kirill Rybalchenko wrote:
> Port info command prints information about all supported flow types,
> including dynamically mapped ones.
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> ---
>  app/test-pmd/config.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 3ae3e1c..bd5de92 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -498,12 +498,15 @@ port_infos_display(portid_t port_id)
>  		char *p;
>  
>  		printf("Supported flow types:\n");
> -		for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < RTE_ETH_FLOW_MAX;
> -								i++) {
> +		for (i = RTE_ETH_FLOW_UNKNOWN + 1;
> +		     i < sizeof(dev_info.flow_type_rss_offloads) * 8; i++) {

What do you think using "CHAR_BIT" instead of "8" to stress the intention?

If you are OK to send new version, please keep JingJing's Review tag.

>  			if (!(dev_info.flow_type_rss_offloads & (1ULL << i)))
>  				continue;
>  			p = flowtype_to_str(i);
> -			printf("  %s\n", (p ? p : "unknown"));
> +			if (p)
> +				printf("  %s\n", p);
> +			else
> +				printf("  user defined %d\n", i);
>  		}
>  	}
>  
> 

  parent reply	other threads:[~2017-09-20 11:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 16:23 Kirill Rybalchenko
2017-09-07  8:26 ` Wu, Jingjing
2017-09-20 11:19 ` Ferruh Yigit [this message]
2017-09-20 15:06 ` [dpdk-dev] [PATCH v2] " Kirill Rybalchenko
2017-10-02 23:44   ` 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=4e0446b7-f372-41ca-1d13-dd1a5a881242@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=andrey.chilikin@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=kirill.rybalchenko@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).