If flow redirect failed, the spinlock will not be unlocked.
This patch fixes it.
Fixes:
bc9201388d56 ("net/ice: support flow redirect")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
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);
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;
}