From: Helin Zhang Date: Wed, 4 Feb 2015 07:16:33 +0000 (+0800) Subject: app/testpmd: support new rss offloads X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7a18146d7b9421dd381f3d26202eec5d44f32ed9;p=dpdk.git app/testpmd: support new rss offloads RSS offloads supported 'ip' and 'udp' only, which did not demonstrate all of the hardware capabilities. The modifications adds support of new RSS offloads of 'tcp', 'sctp', 'ether' and 'all'. Signed-off-by: Helin Zhang Acked-by: Jingjing Wu --- diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index f4ae931913..c6a1627b48 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -529,7 +529,7 @@ static void cmd_help_long_parsed(void *parsed_result, " Set crc-strip/rx-checksum/hardware-vlan/drop_en" " for ports.\n\n" - "port config all rss (ip|udp|none)\n" + "port config all rss (all|ip|tcp|udp|sctp|ether|none)\n" " Set the RSS mode.\n\n" "port config port-id rss reta (hash,queue)[,(hash,queue)]\n" @@ -1321,10 +1321,20 @@ cmd_config_rss_parsed(void *parsed_result, struct rte_eth_rss_conf rss_conf; uint8_t i; - if (!strcmp(res->value, "ip")) + if (!strcmp(res->value, "all")) + rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | + ETH_RSS_UDP | ETH_RSS_SCTP | + ETH_RSS_L2_PAYLOAD; + else if (!strcmp(res->value, "ip")) rss_conf.rss_hf = ETH_RSS_IP; else if (!strcmp(res->value, "udp")) rss_conf.rss_hf = ETH_RSS_UDP; + else if (!strcmp(res->value, "tcp")) + rss_conf.rss_hf = ETH_RSS_TCP; + else if (!strcmp(res->value, "sctp")) + rss_conf.rss_hf = ETH_RSS_SCTP; + else if (!strcmp(res->value, "ether")) + rss_conf.rss_hf = ETH_RSS_L2_PAYLOAD; else if (!strcmp(res->value, "none")) rss_conf.rss_hf = 0; else { @@ -1345,12 +1355,13 @@ cmdline_parse_token_string_t cmd_config_rss_all = cmdline_parse_token_string_t cmd_config_rss_name = TOKEN_STRING_INITIALIZER(struct cmd_config_rss, name, "rss"); cmdline_parse_token_string_t cmd_config_rss_value = - TOKEN_STRING_INITIALIZER(struct cmd_config_rss, value, "ip#udp#none"); + TOKEN_STRING_INITIALIZER(struct cmd_config_rss, value, + "all#ip#tcp#udp#sctp#ether#none"); cmdline_parse_inst_t cmd_config_rss = { .f = cmd_config_rss_parsed, .data = NULL, - .help_str = "port config all rss ip|udp|none", + .help_str = "port config all rss all|ip|tcp|udp|sctp|ether|none", .tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword,