case RTE_ETH_HASH_FUNCTION_DEFAULT:
case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
+ case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
break;
default:
return rte_flow_error_set(error, ENOTSUP,
case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
*hash_algo = HNS3_RSS_HASH_ALGO_SIMPLE;
break;
+ case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
+ *hash_algo = HNS3_RSS_HASH_ALGO_SYMMETRIC_TOEP;
+ break;
default:
hns3_err(hw, "Invalid RSS algorithm configuration(%u)",
algo_func);
static int
hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
{
- uint8_t hash_algo =
- (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_TOEPLITZ ?
- HNS3_RSS_HASH_ALGO_TOEPLITZ : HNS3_RSS_HASH_ALGO_SIMPLE);
struct hns3_rss_tuple_cfg *tuple;
int ret;
hns3_parse_rss_key(hw, rss_config);
/* Parse hash algorithm */
- ret = hns3_parse_rss_algorithm(hw, &rss_config->func, &hash_algo);
+ ret = hns3_parse_rss_algorithm(hw, &rss_config->func,
+ &hw->rss_info.hash_algo);
if (ret)
return ret;
- ret = hns3_set_rss_algo_key(hw, hash_algo, rss_config->key);
+ ret = hns3_set_rss_algo_key(hw, rss_config->key);
if (ret)
return ret;
}
/* Filter the unsupported flow types */
- flow_types = rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT;
+ flow_types = conf->conf.types ?
+ rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT :
+ hw->rss_info.conf.types;
if (flow_types != rss_flow_conf.types)
hns3_warn(hw, "modified RSS types based on hardware support, "
"requested:%" PRIx64 " configured:%" PRIx64,
/* Update the useful flow types */
rss_flow_conf.types = flow_types;
- if ((rss_flow_conf.types & ETH_RSS_PROTO_MASK) == 0)
- return hns3_disable_rss(hw);
-
rss_info = &hw->rss_info;
if (!add) {
if (hns3_action_rss_same(&rss_info->conf, &rss_flow_conf)) {