From: Simei Su Date: Wed, 30 Oct 2019 02:49:30 +0000 (+0800) Subject: net/ice: fix RSS types check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e5cc4e13f6853796702c9b104d291983294c7a09;p=dpdk.git net/ice: fix RSS types check This patch corrects logic error for checking rss->types to match pattern in RSS action parser. Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") Signed-off-by: Simei Su Acked-by: Qi Zhang Acked-by: Xiaolong Ye --- diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index f710b977d0..346d6cfcc3 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -315,13 +315,13 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item, /* Check if rss types match pattern. */ if (rss->func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) { - if (((rss_hf & ETH_RSS_IPV4) != m->eth_rss_hint) || - ((rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) != m->eth_rss_hint) || - ((rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) != m->eth_rss_hint) || - ((rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) != m->eth_rss_hint) || - ((rss_hf & ETH_RSS_IPV6) != m->eth_rss_hint) || - ((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) != m->eth_rss_hint) || - ((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) != m->eth_rss_hint) || + if (((rss_hf & ETH_RSS_IPV4) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_IPV6) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) != m->eth_rss_hint) && ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) != m->eth_rss_hint)) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,