From: Ivan Boule <ivan.boule@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 3/5] app/testpmd: configure RSS without restart
Date: Fri, 16 May 2014 10:58:41 +0200 [thread overview]
Message-ID: <1400230723-2830-4-git-send-email-ivan.boule@6wind.com> (raw)
In-Reply-To: <1400230723-2830-1-git-send-email-ivan.boule@6wind.com>
The function cmd_config_rss_parsed() associated with the command
"port config rss all" required to first stop all ports, in order to
then entirely re-configure all ports with the new RSS hash computation
parameters.
Use now the new function rte_eth_dev_rss_hash_conf_update() that dynamically
only changes the RSS hash computation parameters of a port, without needing
to previously stop the port.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
---
app/test-pmd/cmdline.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 9cc680f..407a2b9 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1145,26 +1145,22 @@ cmd_config_rss_parsed(void *parsed_result,
__attribute__((unused)) void *data)
{
struct cmd_config_rss *res = parsed_result;
-
- if (!all_ports_stopped()) {
- printf("Please stop all ports first\n");
- return;
- }
+ struct rte_eth_rss_conf rss_conf;
+ uint8_t i;
if (!strcmp(res->value, "ip"))
- rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6;
+ rss_conf.rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6;
else if (!strcmp(res->value, "udp"))
- rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6 | ETH_RSS_IPV4_UDP;
+ rss_conf.rss_hf = ETH_RSS_IPV4_UDP | ETH_RSS_IPV6_UDP;
else if (!strcmp(res->value, "none"))
- rss_hf = 0;
+ rss_conf.rss_hf = 0;
else {
printf("Unknown parameter\n");
return;
}
-
- init_port_config();
-
- cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
+ rss_conf.rss_key = NULL;
+ for (i = 0; i < rte_eth_dev_count(); i++)
+ rte_eth_dev_rss_hash_update(i, &rss_conf);
}
cmdline_parse_token_string_t cmd_config_rss_port =
--
1.7.10.4
next prev parent reply other threads:[~2014-05-16 8:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 8:58 [dpdk-dev] [PATCH v2 0/5] allow to dynamically change RSS configuration Ivan Boule
2014-05-16 8:58 ` [dpdk-dev] [PATCH v2 1/5] ethdev: check RX queue indices in RETA config against number of queues Ivan Boule
2014-05-16 8:58 ` [dpdk-dev] [PATCH v2 2/5] ethdev: allow to set RSS hash computation flags and/or key Ivan Boule
2014-05-16 8:58 ` Ivan Boule [this message]
2014-05-16 8:58 ` [dpdk-dev] [PATCH v2 4/5] ethdev: allow to get RSS hash functions and key Ivan Boule
2014-05-16 8:58 ` [dpdk-dev] [PATCH v2 5/5] app/testpmd: allow to configure RSS hash key Ivan Boule
2014-05-27 16:43 ` [dpdk-dev] [PATCH v2 0/5] allow to dynamically change RSS configuration 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=1400230723-2830-4-git-send-email-ivan.boule@6wind.com \
--to=ivan.boule@6wind.com \
--cc=dev@dpdk.org \
/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).