DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] ethdev: avoid error on PCI unplug of already closed ethdev
@ 2019-06-21  9:40 Andrew Rybchenko
  2019-06-21  9:40 ` [dpdk-dev] [PATCH 2/3] net/sfc: ensure that device is closed on removal Andrew Rybchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrew Rybchenko @ 2019-06-21  9:40 UTC (permalink / raw)
  To: dev; +Cc: stable, Thomas Monjalon, Ferruh Yigit

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


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [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

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