From: Xueming Li <xuemingl@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>,
Nelio Laranjeiro <notifications@github.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Thomas Monjalon <thomas@monjalon.net>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: Xueming Li <xuemingl@mellanox.com>, dev@dpdk.org
Subject: [dpdk-dev] [PATCH v5 2/2] app/testpmd: new parameter for port config all rss command
Date: Fri, 20 Apr 2018 22:30:23 +0800 [thread overview]
Message-ID: <20180420143023.117071-2-xuemingl@mellanox.com> (raw)
In-Reply-To: <20180420143023.117071-1-xuemingl@mellanox.com>
In-Reply-To: <20180409121035.148813-1-xuemingl@mellanox.com>
This patches add "default" parameter to "port config all rss" command.
"default" means all supported hash types reported by device info.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
app/test-pmd/cmdline.c | 13 +++++++++----
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 512e3b55e..77068129e 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -821,8 +821,8 @@ static void cmd_help_long_parsed(void *parsed_result,
" Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en"
" for ports.\n\n"
- "port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|"
- "geneve|nvgre|none|<flowtype_id>)\n"
+ "port config all rss (all|default|ip|tcp|udp|sctp|"
+ "ether|port|vxlan|geneve|nvgre|none|<flowtype_id>)\n"
" Set the RSS mode.\n\n"
"port config port-id rss reta (hash,queue)[,(hash,queue)]\n"
@@ -1998,6 +1998,7 @@ cmd_config_rss_parsed(void *parsed_result,
{
struct cmd_config_rss *res = parsed_result;
struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
+ struct rte_eth_dev_info dev_info = { .flow_type_rss_offloads = 0, };
int diag;
uint8_t i;
@@ -2023,7 +2024,7 @@ cmd_config_rss_parsed(void *parsed_result,
rss_conf.rss_hf = ETH_RSS_GENEVE;
else if (!strcmp(res->value, "nvgre"))
rss_conf.rss_hf = ETH_RSS_NVGRE;
- else if (!strcmp(res->value, "none"))
+ else if (!strcmp(res->value, "none") || !strcmp(res->value, "default"))
rss_conf.rss_hf = 0;
else if (isdigit(res->value[0]) && atoi(res->value) > 0 &&
atoi(res->value) < 64)
@@ -2034,6 +2035,10 @@ cmd_config_rss_parsed(void *parsed_result,
}
rss_conf.rss_key = NULL;
for (i = 0; i < rte_eth_dev_count(); i++) {
+ if (!strcmp(res->value, "default")) {
+ rte_eth_dev_info_get(i, &dev_info);
+ rss_conf.rss_hf = dev_info.flow_type_rss_offloads;
+ }
diag = rte_eth_dev_rss_hash_update(i, &rss_conf);
if (diag < 0)
printf("Configuration of RSS hash at ethernet port %d "
@@ -2057,7 +2062,7 @@ cmdline_parse_inst_t cmd_config_rss = {
.f = cmd_config_rss_parsed,
.data = NULL,
.help_str = "port config all rss "
- "all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none|<flowtype_id>",
+ "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none|<flowtype_id>",
.tokens = {
(void *)&cmd_config_rss_port,
(void *)&cmd_config_rss_keyword,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index a766ac795..0e1719d9a 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1751,10 +1751,12 @@ port config - RSS
Set the RSS (Receive Side Scaling) mode on or off::
- testpmd> port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none)
+ testpmd> port config all rss (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none)
RSS is on by default.
+The ``all`` option is equivalent to ip|tcp|udp|sctp|ether.
+The ``default`` option enables all supported RSS types reported by device info.
The ``none`` option is equivalent to the ``--disable-rss`` command-line option.
port config - RSS Reta
--
2.13.3
next prev parent reply other threads:[~2018-04-20 14:30 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-18 7:37 [dpdk-dev] [PATCH] net/mlx5: add supported hash function check Xueming Li
2018-03-19 8:29 ` Nélio Laranjeiro
2018-03-22 10:42 ` Xueming(Steven) Li
2018-03-26 11:39 ` Nélio Laranjeiro
2018-04-02 12:41 ` Xueming(Steven) Li
2018-04-04 7:35 ` Nélio Laranjeiro
2018-04-09 12:10 ` [dpdk-dev] [PATCH v1 1/2] ethdev: " Xueming Li
2018-04-16 22:56 ` Thomas Monjalon
2018-04-17 14:24 ` [dpdk-dev] [PATCH v2 " Xueming Li
2018-04-17 22:00 ` Thomas Monjalon
2018-04-18 11:55 ` Xueming(Steven) Li
2018-04-18 12:15 ` Thomas Monjalon
2018-04-17 14:24 ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: only config supported RSS hash types Xueming Li
2018-04-18 8:11 ` [dpdk-dev] [PATCH v3 1/2] ethdev: add supported hash function check Xueming Li
2018-04-18 8:11 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config supported RSS hash types Xueming Li
2018-04-18 11:06 ` [dpdk-dev] [PATCH v3 1/2] ethdev: add supported hash function check Xueming Li
2018-04-18 11:06 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config supported RSS hash types Xueming Li
2018-04-18 13:25 ` Adrien Mazarguil
2018-04-18 13:54 ` Xueming(Steven) Li
2018-04-18 14:16 ` Adrien Mazarguil
2018-04-18 14:26 ` Xueming(Steven) Li
2018-04-18 14:47 ` Adrien Mazarguil
2018-04-18 14:10 ` Xueming(Steven) Li
2018-04-18 14:30 ` Adrien Mazarguil
2018-04-19 15:50 ` Xueming(Steven) Li
2018-04-19 15:48 ` [dpdk-dev] [PATCH v4 1/2] ethdev: add supported hash function check Xueming Li
2018-04-20 8:10 ` Adrien Mazarguil
2018-04-19 15:48 ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: new parameter for port config all rss command Xueming Li
2018-04-20 8:10 ` Adrien Mazarguil
2018-04-20 13:06 ` [dpdk-dev] [PATCH v5 1/2] ethdev: introduce generic IP/UDP tunnel checksum and TSO Xueming Li
2018-04-20 13:48 ` Ferruh Yigit
2018-04-20 14:23 ` Ferruh Yigit
2018-04-20 14:23 ` Xueming(Steven) Li
2018-04-20 13:06 ` [dpdk-dev] [PATCH v5 2/2] app/testpmd: testpmd support Tx generic tunnel offloads Xueming Li
2018-04-20 14:29 ` Xueming(Steven) Li
2018-04-20 14:30 ` [dpdk-dev] [PATCH v5 1/2] ethdev: add supported hash function check Xueming Li
2018-04-20 14:35 ` Ferruh Yigit
2018-04-20 14:44 ` Xueming(Steven) Li
2018-04-23 15:20 ` Thomas Monjalon
2018-04-23 16:07 ` Ferruh Yigit
2018-04-23 16:06 ` Ferruh Yigit
2018-04-23 18:14 ` Thomas Monjalon
2018-05-01 11:04 ` Ferruh Yigit
2018-05-01 14:04 ` Thomas Monjalon
2018-04-20 14:30 ` Xueming Li [this message]
2018-04-09 12:10 ` [dpdk-dev] [PATCH v1 2/2] app/testpmd: config all supported RSS functions Xueming Li
2018-04-16 22:53 ` 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=20180420143023.117071-2-xuemingl@mellanox.com \
--to=xuemingl@mellanox.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=notifications@github.com \
--cc=shahafs@mellanox.com \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@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).