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

Jiawen Wu jiawenwu at trustnetic.com
Tue Jun 18 09:11:42 CEST 2024


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 at dpdk.org

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

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 = {
-- 
2.27.0



More information about the dev mailing list