DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ivan Malov <ivan.malov@oktetlabs.ru>
To: dev@dpdk.org
Cc: stable@dpdk.org, Andrew Rybchenko <arybchenko@solarflare.com>
Subject: [dpdk-dev] [PATCH] net/sfc: fix adapter lock usage on rule creation
Date: Sun,  3 Nov 2019 13:33:09 +0300	[thread overview]
Message-ID: <20191103103309.10813-1-ivan.malov@oktetlabs.ru> (raw)

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


             reply	other threads:[~2019-11-03 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-03 10:33 Ivan Malov [this message]
2019-11-07 20:56 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191103103309.10813-1-ivan.malov@oktetlabs.ru \
    --to=ivan.malov@oktetlabs.ru \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).