DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix device hotplug remove
@ 2019-11-06  5:09 Di ChenxuX
  2019-11-07  6:28 ` [dpdk-dev] [PATCH v2] " Di ChenxuX
  0 siblings, 1 reply; 8+ messages in thread
From: Di ChenxuX @ 2019-11-06  5:09 UTC (permalink / raw)
  To: dev; +Cc: Yang Qiming, Di ChenxuX

testpmd will occur infinite loops when device hotplug remove.
We can fix the issue by using the pci generic remove function

Fixes: f2f4990eff94 ("net/ixgbe: release port upon close")

Signed-off-by: Di ChenxuX <chenxux.di@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index dbce7a80e..84b98071d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1796,16 +1796,7 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 
 static int eth_ixgbe_pci_remove(struct rte_pci_device *pci_dev)
 {
-	struct rte_eth_dev *ethdev;
-
-	ethdev = rte_eth_dev_allocated(pci_dev->device.name);
-	if (!ethdev)
-		return -ENODEV;
-
-	if (ethdev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR)
-		return rte_eth_dev_destroy(ethdev, ixgbe_vf_representor_uninit);
-	else
-		return rte_eth_dev_destroy(ethdev, eth_ixgbe_dev_uninit);
+	return rte_eth_dev_pci_generic_remove(pci_dev, eth_ixgbe_dev_uninit);
 }
 
 static struct rte_pci_driver rte_ixgbe_pmd = {
-- 
2.17.1


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

end of thread, other threads:[~2019-11-13  2:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  5:09 [dpdk-dev] [PATCH] net/ixgbe: fix device hotplug remove Di ChenxuX
2019-11-07  6:28 ` [dpdk-dev] [PATCH v2] " Di ChenxuX
2019-11-11  8:41   ` Ye Xiaolong
2019-11-11  8:50     ` Di, ChenxuX
2019-11-11  9:00       ` Ye Xiaolong
2019-11-11  9:38         ` Di, ChenxuX
2019-11-12  6:00   ` [dpdk-dev] [PATCH v3] " Di ChenxuX
2019-11-13  2:11     ` Ye Xiaolong

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