DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/sfc: fix adapter lock usage on rule creation
@ 2019-11-03 10:33 Ivan Malov
  2019-11-07 20:56 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Malov @ 2019-11-03 10:33 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrew Rybchenko

The point is that adapter lock has to be held on
list accesses, as well as when talking to the HW.

Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index e4a9ba0ff..8d636f692 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -2315,10 +2315,10 @@ sfc_flow_create(struct rte_eth_dev *dev,
 	if (rc != 0)
 		goto fail_bad_value;
 
-	TAILQ_INSERT_TAIL(&sa->filter.flow_list, flow, entries);
-
 	sfc_adapter_lock(sa);
 
+	TAILQ_INSERT_TAIL(&sa->filter.flow_list, flow, entries);
+
 	if (sa->state == SFC_ADAPTER_STARTED) {
 		rc = sfc_flow_filter_insert(sa, flow);
 		if (rc != 0) {
-- 
2.20.1


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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/sfc: fix adapter lock usage on rule creation
  2019-11-03 10:33 [dpdk-dev] [PATCH] net/sfc: fix adapter lock usage on rule creation Ivan Malov
@ 2019-11-07 20:56 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2019-11-07 20:56 UTC (permalink / raw)
  To: Ivan Malov, dev; +Cc: stable, Andrew Rybchenko

On 11/3/2019 10:33 AM, Ivan Malov wrote:
> The point is that adapter lock has to be held on
> list accesses, as well as when talking to the HW.
> 
> Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2019-11-07 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-03 10:33 [dpdk-dev] [PATCH] net/sfc: fix adapter lock usage on rule creation Ivan Malov
2019-11-07 20:56 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

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).