DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: fix deadlock in ice_flow_query()
@ 2021-08-19 12:10 Yu Wenjun
  2021-08-29 13:06 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Wenjun @ 2021-08-19 12:10 UTC (permalink / raw)
  To: qiming.yang, qi.z.zhang; +Cc: dev, stable, Yu Wenjun

It will cause deadlock when use switch-default, so fix it

Signed-off-by: Yu Wenjun<yuwenjun0x@163.com>
---
 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ice: fix deadlock in ice_flow_query()
  2021-08-19 12:10 [dpdk-dev] [PATCH] net/ice: fix deadlock in ice_flow_query() Yu Wenjun
@ 2021-08-29 13:06 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-08-29 13:06 UTC (permalink / raw)
  To: Yu Wenjun, Yang, Qiming; +Cc: dev, stable



> -----Original Message-----
> From: Yu Wenjun <yuwenjun0x@163.com>
> Sent: Thursday, August 19, 2021 8:10 PM
> To: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Yu Wenjun <yuwenjun0x@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@163.com>

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

Acked-by: Qi Zhang <qi.z.zhang@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
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-29 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 12:10 [dpdk-dev] [PATCH] net/ice: fix deadlock in ice_flow_query() Yu Wenjun
2021-08-29 13:06 ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).