ethdev: avoid error on PCI unplug of closed port
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> Reported-by: David Marchand <david.marchand@redhat.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
87c95f0445
commit
ca5ba1b697
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user