From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: <stable@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH 1/3] ethdev: avoid error on PCI unplug of already closed ethdev
Date: Fri, 21 Jun 2019 10:40:39 +0100 [thread overview]
Message-ID: <1561110041-1795-1-git-send-email-arybchenko@solarflare.com> (raw)
If PCI Ethernet device driver removes it on close
(RTE_ETH_DEV_CLOSE_REMOVE) and later PCI device itself is unplugged,
it should not fail because of Ethernet device is already removed.
Fixes: 23ea57a2a0ce ("ethdev: complete closing of port")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_ethdev/rte_ethdev_pci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index 23257e986..ccdbb46ec 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -184,7 +184,7 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev,
eth_dev = rte_eth_dev_allocated(pci_dev->device.name);
if (!eth_dev)
- return -ENODEV;
+ return 0;
if (dev_uninit) {
ret = dev_uninit(eth_dev);
--
2.17.1
next 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 Andrew Rybchenko [this message]
2019-06-21 9:40 ` [dpdk-dev] [PATCH 2/3] net/sfc: ensure that device is closed on removal Andrew Rybchenko
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-1-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).