From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 565DC5940 for ; Thu, 5 Jun 2014 07:11:49 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 04 Jun 2014 22:11:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,978,1392192000"; d="scan'208";a="522980514" Received: from shilc102.sh.intel.com ([10.239.39.44]) by orsmga001.jf.intel.com with ESMTP; 04 Jun 2014 22:11:39 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shilc102.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s555BZuo025162; Thu, 5 Jun 2014 13:11: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 s555BVTw024000; Thu, 5 Jun 2014 13:11:33 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s555BV8u023996; Thu, 5 Jun 2014 13:11:31 +0800 From: Helin Zhang To: dev@dpdk.org Date: Thu, 5 Jun 2014 13:08:59 +0800 Message-Id: <1401944951-23783-16-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1401944951-23783-1-git-send-email-helin.zhang@intel.com> References: <1401944951-23783-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v2 15/27] app/testpmd: enlarge the hash flags of RSS to 64 bits 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: Thu, 05 Jun 2014 05:11:52 -0000 As the hash flags of RSS has been enlarged from 16 bits to 64 bits in 'struct rte_eth_rss_conf' in rte_ethdev.h, the size of it in testpmd should be enlarged as well. In addition, macro of ETH_RSS_IP is used to replace all IP hash flags of RSS. Signed-off-by: Helin Zhang Signed-off-by: Jing Chen Acked-by: Cunming Liang Acked-by: Jijiang Liu Acked-by: Jingjing Wu Tested-by: Waterman Cao --- app/test-pmd/cmdline.c | 4 ++-- app/test-pmd/parameters.c | 5 ++--- app/test-pmd/testpmd.c | 2 +- app/test-pmd/testpmd.h | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index ddb825d..fb52e89 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1135,9 +1135,9 @@ cmd_config_rss_parsed(void *parsed_result, uint8_t i; if (!strcmp(res->value, "ip")) - rss_conf.rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6; + rss_conf.rss_hf = ETH_RSS_IP; else if (!strcmp(res->value, "udp")) - rss_conf.rss_hf = ETH_RSS_IPV4_UDP | ETH_RSS_IPV6_UDP; + rss_conf.rss_hf = ETH_RSS_UDP; else if (!strcmp(res->value, "none")) rss_conf.rss_hf = 0; else { diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 7a60048..725ca6f 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -832,10 +832,9 @@ launch_args_parse(int argc, char** argv) if (!strcmp(lgopts[opt_idx].name, "forward-mode")) set_pkt_forwarding_mode(optarg); if (!strcmp(lgopts[opt_idx].name, "rss-ip")) - rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6; + rss_hf = ETH_RSS_IP; if (!strcmp(lgopts[opt_idx].name, "rss-udp")) - rss_hf = ETH_RSS_IPV4 | - ETH_RSS_IPV6 | ETH_RSS_IPV4_UDP; + rss_hf = ETH_RSS_UDP; if (!strcmp(lgopts[opt_idx].name, "rxq")) { n = atoi(optarg); if (n >= 1 && n <= (int) MAX_QUEUE_ID) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index bc38305..eea2c6c 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -250,7 +250,7 @@ uint32_t txq_flags = 0; /* No flags set. */ /* * Receive Side Scaling (RSS) configuration. */ -uint16_t rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6; /* RSS IP by default. */ +uint64_t rss_hf = ETH_RSS_IP; /* RSS IP by default. */ /* * Port topology configuration diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index c2b970e..f91f9cd 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -326,7 +326,7 @@ extern portid_t fwd_ports_ids[RTE_MAX_ETHPORTS]; extern struct rte_port *ports; extern struct rte_eth_rxmode rx_mode; -extern uint16_t rss_hf; +extern uint64_t rss_hf; extern queueid_t nb_rxq; extern queueid_t nb_txq; -- 1.8.1.4