> -----Original Message----- > From: Yu Wenjun <yuwenju...@163.com> > Sent: Thursday, August 19, 2021 8:10 PM > To: Yang, Qiming <qiming.y...@intel.com>; Zhang, Qi Z > <qi.z.zh...@intel.com> > Cc: dev@dpdk.org; sta...@dpdk.org; Yu Wenjun <yuwenju...@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<yuwenju...@163.com> Fixes: 0d6ef740e411 ("net/ice: support flow ops thread safe") Cc: sta...@dpdk.org Acked-by: Qi Zhang <qi.z.zh...@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 >