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 <helin.zhang at intel.com> Signed-off-by: Mark Chen <jing.d.chen at intel.com> --- 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 b3824f9..7ecfc84 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1131,9 +1131,9 @@ cmd_config_rss_parsed(void *parsed_result, } if (!strcmp(res->value, "ip")) - rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6; + rss_hf = ETH_RSS_IP; else if (!strcmp(res->value, "udp")) - rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6 | ETH_RSS_IPV4_UDP; + rss_hf = ETH_RSS_UDP; else if (!strcmp(res->value, "none")) 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 2bdb1a2..0e891cd 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