From: Xuan Ding Date: Fri, 22 Jan 2021 03:19:22 +0000 (+0000) Subject: net/iavf: fix symmetric flow rule creation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3e7ff9d5d80386b9f588f401c91b044ea08a68c5;p=dpdk.git net/iavf: fix symmetric flow rule creation Only allow to create symmetric rule for L3/L4. Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") Cc: stable@dpdk.org Signed-off-by: Xuan Ding Acked-by: Beilei Xing --- diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index f437fc3170..d8d22f8009 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -927,6 +927,13 @@ iavf_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 */