[dpdk-dev] [PATCH] net/ice: fix deadlock in ice_flow_query()

Zhang, Qi Z qi.z.zhang at intel.com
Sun Aug 29 15:06:04 CEST 2021



> -----Original Message-----
> From: Yu Wenjun <yuwenjun0x at 163.com>
> Sent: Thursday, August 19, 2021 8:10 PM
> To: Yang, Qiming <qiming.yang at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>
> Cc: dev at dpdk.org; stable at dpdk.org; Yu Wenjun <yuwenjun0x at 163.com>
> Subject: [PATCH] net/ice: fix deadlock in ice_flow_query()
> 
> It will cause deadlock when use switch-default, so fix it
> 
> Signed-off-by: Yu Wenjun<yuwenjun0x at 163.com>

Fixes: 0d6ef740e411 ("net/ice: support flow ops thread safe")
Cc: stable at dpdk.org

Acked-by: Qi Zhang <qi.z.zhang at intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

> ---
>  drivers/net/ice/ice_generic_flow.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_generic_flow.c
> b/drivers/net/ice/ice_generic_flow.c
> index 66b5743abf..c2fa75f165 100644
> --- a/drivers/net/ice/ice_generic_flow.c
> +++ b/drivers/net/ice/ice_generic_flow.c
> @@ -2518,15 +2518,16 @@ ice_flow_query(struct rte_eth_dev *dev,
>  			ret = flow->engine->query_count(ad, flow, count, error);
>  			break;
>  		default:
> -			return rte_flow_error_set(error, ENOTSUP,
> +			ret = rte_flow_error_set(error, ENOTSUP,
>  					RTE_FLOW_ERROR_TYPE_ACTION,
>  					actions,
>  					"action not supported");
> +			goto out;
>  		}
>  	}
> 
> +out:
>  	rte_spinlock_unlock(&pf->flow_ops_lock);
> -
>  	return ret;
>  }
> 
> --
> 2.32.0.windows.1
> 



More information about the dev mailing list