net/ice: fix error log in generic flow

When create a RSS rule with void action, the error log is "Invalid
input set". This patch fix the issue by adding check for the type of
first actions item.

Fixes: 7615a68950 ("net/ice: rework for generic flow enabling")
Cc: stable@dpdk.org

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
Shougang Wang 2020-07-06 09:37:05 +00:00 committed by Ferruh Yigit
parent 54851ff337
commit c04e7f5a70

View File

@ -1873,7 +1873,7 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
return -rte_errno;
}
if (!actions) {
if (!actions || actions->type == RTE_FLOW_ACTION_TYPE_END) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_NUM,
NULL, "NULL action.");