[dpdk-dev] [PATCH 1/3] net/ice: fix flow get inputset check

Yang, Qiming qiming.yang at intel.com
Thu Jul 18 04:33:23 CEST 2019


It's no need to add RTE_FLOW_ITEM_TYPE_VOID because we have skipped all the VOID items.

-----Original Message-----
From: Wang, Ying A 
Sent: Thursday, July 18, 2019 9:39 AM
To: Zhang, Qi Z <qi.z.zhang at intel.com>
Cc: Yang, Qiming <qiming.yang at intel.com>; dev at dpdk.org; Wang, Ying A <ying.a.wang at intel.com>; stable at dpdk.org
Subject: [PATCH 1/3] net/ice: fix flow get inputset check

ice_get_flow_field should not set error if item->type is RTE_FLOW_ITEM_TYPE_VOID.
This patch fixes this issue.

Fixes: d76116a4678f ("net/ice: add generic flow API")
Cc: stable at dpdk.org

Signed-off-by: Wang Ying A <ying.a.wang at intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index c2931a1..464f6ec 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -465,7 +465,7 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
 		case RTE_FLOW_ITEM_TYPE_NVGRE:
 			nvgre_spec = item->spec;
 			nvgre_mask = item->mask;
-			/* Check if VXLAN item is used to describe protocol.
+			/* Check if NVGRE item is used to describe protocol.
 			 * If yes, both spec and mask should be NULL.
 			 * If no, both spec and mask shouldn't be NULL.
 			 */
@@ -480,6 +480,8 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
 			is_tunnel = 1;
 
 			break;
+		case RTE_FLOW_ITEM_TYPE_VOID:
+			break;
 		default:
 			rte_flow_error_set(error, EINVAL,
 					   RTE_FLOW_ERROR_TYPE_ITEM,
--
1.8.3.1



More information about the dev mailing list