net/ice: fix deadlock on flow redirect
PATCH 1/1 net/ice: fix deadlock on flow redirect
From: Dapeng Yu <[email protected]>
If flow redirect failed, the spinlock will not be unlocked. This patch fixes it.
Fixes bc9201388d56 ("net/ice: support flow redirect")
Signed-off-by Dapeng Yu <[email protected]>
--- drivers/net/ice/ice_generic_flow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ice/ice_generic_flow.c +3 -3
@@ -2542,7 +2542,7 @@ ice_flow_redirect(struct ice_adapter *ad,struct ice_pf *pf = &ad->pf;struct rte_flow *p_flow;void *temp; -int ret; +int ret =0 ;rte_spinlock_lock (&pf->flow_ops_lock);
@@ -2552,11 +2552,11 @@ ice_flow_redirect(struct ice_adapter *ad, ret = p_flow->engine->redirect (ad, p_flow, rd);if (ret) {PMD_DRV_LOG (ERR ,"Failed to redirect flows" ); -return ret; +break ; } }rte_spinlock_unlock (&pf->flow_ops_lock); -return 0 ; +return ret; }
Signature · 1 line
2.27.0
Quoted 12 lines
-----Original Message-----
From: Yu, DapengX <[email protected]>
Sent: Monday, October 11, 2021 3:39 PM
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/ice: fix deadlock on flow redirectFrom: Dapeng Yu <[email protected]>
Quoted 7 lines
If flow redirect failed, the spinlock will not be unlocked. This patch fixes it.
Fixes bc9201388d56 ("net/ice: support flow redirect")Signed-off-by Dapeng Yu <[email protected]>
Acked-by Qi Zhang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi