DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
To: dev@dpdk.org
Cc: kirill.rybalchenko@intel.com, andrey.chilikin@intel.com,
	beilei.xing@intel.com, jingjing.wu@intel.com
Subject: [dpdk-dev] [PATCH v2] app/testpmd: port info prints dynamically mapped flow types
Date: Wed, 20 Sep 2017 16:06:27 +0100	[thread overview]
Message-ID: <1505919987-13639-1-git-send-email-kirill.rybalchenko@intel.com> (raw)
In-Reply-To: <1504283001-54863-1-git-send-email-kirill.rybalchenko@intel.com>

Port info command prints information about all supported flow types,
including dynamically mapped ones.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>

Reviewed-by: Jingjing Wu <jingjing.wu@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 ca83eef..fa93032 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) * CHAR_BIT; i++) {
 			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);
 		}
 	}
 
-- 
2.5.5

  parent reply	other threads:[~2017-09-20 15:06 UTC|newest]

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