DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH 2/3] net/sfc: ensure that device is closed on removal
Date: Fri, 21 Jun 2019 10:40:40 +0100	[thread overview]
Message-ID: <1561110041-1795-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1561110041-1795-1-git-send-email-arybchenko@solarflare.com>

PCI device may be unplugged when ethdev is not closed yet.

Fixes: aaa3f5f0f79d ("net/sfc: add configure and close stubs")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index be185d5e9..583f31b8c 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -2196,6 +2196,8 @@ sfc_eth_dev_uninit(struct rte_eth_dev *dev)
 		return 0;
 	}
 
+	sfc_dev_close(dev);
+
 	sa = sfc_adapter_by_eth_dev(dev);
 	sfc_log_init(sa, "entry");
 
-- 
2.17.1


  reply	other threads:[~2019-06-21  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21  9:40 [dpdk-dev] [PATCH 1/3] ethdev: avoid error on PCI unplug of already closed ethdev Andrew Rybchenko
2019-06-21  9:40 ` Andrew Rybchenko [this message]
2019-06-21  9:40 ` [dpdk-dev] [PATCH 3/3] net/sfc: release port upon close Andrew Rybchenko
2019-06-21  9:52 ` [dpdk-dev] [dpdk-stable] [PATCH 1/3] ethdev: avoid error on PCI unplug of already closed ethdev David Marchand
2019-06-21 10:15   ` Andrew Rybchenko
2019-07-02 17:38     ` Ferruh Yigit
2019-07-03 13:55       ` 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=1561110041-1795-2-git-send-email-arybchenko@solarflare.com \
    --to=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).