net/iavf: fix symmetric rule creating
Checks
Commit Message
Do not allow to create symmetric rule only if l3/l4 src/dst_only is set.
Fixes: 91f27b2e39ab("net/iavf: refactor RSS")
Cc: stable@dpdk.org
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
---
drivers/net/iavf/iavf_hash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -924,8 +924,8 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
* hash function.
*/
if (rss_func == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) {
- if (rss_type & (ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY |
- ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY))
+ 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;
}