patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/iavf: protect insertion in flow list
@ 2023-01-05 13:57 David Marchand
  2023-01-09  9:21 ` David Marchand
  2023-01-17  2:08 ` Zhang, Qi Z
  0 siblings, 2 replies; 3+ messages in thread
From: David Marchand @ 2023-01-05 13:57 UTC (permalink / raw)
  To: dev; +Cc: stable, Jingjing Wu, Beilei Xing, Qi Zhang, Qiming Yang

Add missing lock acquire.

Fixes: ff2d0c345c3b ("net/iavf: support generic flow API")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/iavf/iavf_generic_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index f33c764764..6f6e95fc45 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -2278,11 +2278,12 @@ iavf_flow_create(struct rte_eth_dev *dev,
 	}
 
 	flow->engine = engine;
+	rte_spinlock_lock(&vf->flow_ops_lock);
 	TAILQ_INSERT_TAIL(&vf->flow_list, flow, node);
+	rte_spinlock_unlock(&vf->flow_ops_lock);
 	PMD_DRV_LOG(INFO, "Succeeded to create (%d) flow", engine->type);
 
 free_flow:
-	rte_spinlock_unlock(&vf->flow_ops_lock);
 	return flow;
 }
 
-- 
2.39.0


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

end of thread, other threads:[~2023-01-17  2:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 13:57 [PATCH] net/iavf: protect insertion in flow list David Marchand
2023-01-09  9:21 ` David Marchand
2023-01-17  2:08 ` 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).