net/i40e: forbid two RSS flow rules

Refuse to create the second RSS flow rule as only one RSS key and
HASH register for each PF port. Users should delete the first rule
before setup the second rule.

Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Wenjie Li <wenjiex.a.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
Wei Zhao 2019-05-09 10:59:30 +08:00 committed by Ferruh Yigit
parent f0e1ba5e95
commit b2319e4c01

View File

@ -4444,6 +4444,14 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
}
}
if (rss_info->conf.queue_num) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
act,
"rss only allow one valid rule");
return -rte_errno;
}
/* Parse RSS related parameters from configuration */
if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT)
return rte_flow_error_set