From: Xuan Ding Date: Thu, 21 Jan 2021 07:26:57 +0000 (+0000) Subject: net/ice: fix symmetric rule creation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=11320446558f81270a254cce4998abea3cdf0c3f;p=dpdk.git net/ice: fix symmetric rule creation Only allow to create symmetric rule for L3/L4. Fixes: 38d632cbdc88 ("net/ice: refactor PF RSS") Signed-off-by: Xuan Ding Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 322df649b1..8792e44eb8 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -868,6 +868,13 @@ ice_any_invalid_rss_type(enum rte_eth_hash_function rss_func, if (rss_type & (ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY)) return true; + + if (!(rss_type & + (ETH_RSS_IPV4 | ETH_RSS_IPV6 | + ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV6_UDP | + ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_NONFRAG_IPV6_TCP | + ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_NONFRAG_IPV6_SCTP))) + return true; } /* check invalid combination */