net/ice: fix incorrect error log in generic flow

Message ID 20200706093705.65323-1-shougangx.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/ice: fix incorrect error log in generic flow |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-testing success Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Shougang Wang July 6, 2020, 9:37 a.m. UTC
  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: 7615a6895009 ("net/ice: rework for generic flow enabling")
Cc: stable@dpdk.org

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Qi Zhang July 7, 2020, 12:38 a.m. UTC | #1
> -----Original Message-----
> From: Wang, ShougangX <shougangx.wang@intel.com>
> Sent: Monday, July 6, 2020 5:37 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] net/ice: fix incorrect 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: 7615a6895009 ("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>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index ad103d0e8..80ef0e323 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -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.");