From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 739B85AA3 for ; Mon, 19 Jan 2015 07:56:40 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 18 Jan 2015 22:56:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="442155253" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 18 Jan 2015 22:43:28 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t0J6ubu9015694; Mon, 19 Jan 2015 14:56:37 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t0J6uYK5026052; Mon, 19 Jan 2015 14:56:36 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0J6uYjp026048; Mon, 19 Jan 2015 14:56:34 +0800 From: Helin Zhang To: dev@dpdk.org Date: Mon, 19 Jan 2015 14:56:17 +0800 Message-Id: <1421650577-25969-8-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1421650577-25969-1-git-send-email-helin.zhang@intel.com> References: <1421650577-25969-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH 7/7] app/testpmd: support new rss offloads X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 06:56:42 -0000 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 --- app/test-pmd/cmdline.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 80b9c32..02cd5b2 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -588,7 +588,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" @@ -1382,10 +1382,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 { @@ -1406,12 +1416,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, -- 1.9.3