[dpdk-stable] [PATCH] net/ice: correct RSS types check error

Simei Su simei.su at intel.com
Wed Oct 30 03:49:30 CET 2019


This patch corrects logic error for checking rss->types to match
pattern in RSS action parser.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable at dpdk.org

Signed-off-by: Simei Su <simei.su at intel.com>
---
 drivers/net/ice/ice_hash.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f710b97..346d6cf 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -315,13 +315,13 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 
 			/* 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,
-- 
1.8.3.1



More information about the stable mailing list