Ther is a error in queue index check for RSS queue region configuration. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Signed-off-by: Wei Zhao <wei.zh...@intel.com> Tested-by: Peng Yuan <yuan.p...@intel.com> --- drivers/net/i40e/i40e_flow.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index f4d08bb..fb7ad51 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -4240,6 +4240,14 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, return -rte_errno; } } + + if (rss_info->num < rss->num) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "no valid queues"); + return -rte_errno; + } } for (n = 0; n < conf_info->queue_region_number; n++) { @@ -4264,17 +4272,6 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, return -rte_errno; } - if (rss_info->num < rss->num || - rss->queue[0] < rss_info->queue[0] || - (rss->queue[0] + rss->num > - rss_info->num + rss_info->queue[0])) { - rte_flow_error_set(error, EINVAL, - RTE_FLOW_ERROR_TYPE_ACTION, - act, - "no valid queues"); - return -rte_errno; - } - for (i = 0; i < info->queue_region_number; i++) { if (info->region[i].queue_num == rss->num && info->region[i].queue_start_index == -- 2.7.5