- return (comp->func == with->func &&
- comp->level == with->level &&
- comp->types == with->types &&
- comp->key_len == with->key_len &&
+ bool func_is_same;
+
+ /*
+ * When user flush all RSS rule, RSS func is set invalid with
+ * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after
+ * flushed, any validate RSS func is different with it before
+ * flushed. Others, when user create an action RSS with RSS func
+ * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same
+ * between continuous RSS flow.
+ */
+ if (comp->func == RTE_ETH_HASH_FUNCTION_MAX)
+ func_is_same = false;
+ else
+ func_is_same = (with->func ? (comp->func == with->func) : true);
+
+ return (func_is_same &&
+ comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) &&
+ comp->level == with->level && comp->key_len == with->key_len &&