From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EBC29ADB5 for ; Wed, 4 Feb 2015 08:16:58 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 03 Feb 2015 23:12:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,517,1418112000"; d="scan'208";a="661247725" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 03 Feb 2015 23:16:54 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t147GquO012955; Wed, 4 Feb 2015 15:16:52 +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 t147Goc1027049; Wed, 4 Feb 2015 15:16:52 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t147GoIv027045; Wed, 4 Feb 2015 15:16:50 +0800 From: Helin Zhang To: dev@dpdk.org Date: Wed, 4 Feb 2015 15:16:33 +0800 Message-Id: <1423034193-26966-8-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1423034193-26966-1-git-send-email-helin.zhang@intel.com> References: <1421650577-25969-1-git-send-email-helin.zhang@intel.com> <1423034193-26966-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v2 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: Wed, 04 Feb 2015 07:17:00 -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 679ea07..7a004cb 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -589,7 +589,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" @@ -1394,10 +1394,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 { @@ -1418,12 +1428,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