From: Ying A Wang Date: Thu, 18 Jul 2019 01:38:41 +0000 (+0800) Subject: net/ice: fix flow validation for void item type X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b7296fcff344d6ec586888842511e41303c55fab;p=dpdk.git net/ice: fix flow validation for void item type 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") Signed-off-by: Ying A Wang Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index c2931a1c43..464f6ec558 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. */ @@ -479,6 +479,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,