[11/19] net/ngbe: fix hotplug remove

Message ID 20240618071150.21564-12-jiawenwu@trustnetic.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series Wangxun fixes and supports |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jiawen Wu June 18, 2024, 7:11 a.m. UTC
This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.

Fixes: 6ee7e574cd48 ("net/ngbe: support probe and remove")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 2a858b76d0..9d75e222c3 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -547,7 +547,7 @@  static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
 	if (ethdev == NULL)
 		return 0;
 
-	return rte_eth_dev_destroy(ethdev, eth_ngbe_dev_uninit);
+	return rte_eth_dev_pci_generic_remove(pci_dev, eth_ngbe_dev_uninit);
 }
 
 static struct rte_pci_driver rte_ngbe_pmd = {