Hi, > -----Original Message----- > From: Ye, Xiaolong > Sent: Thursday, November 7, 2019 11:11 AM > To: Di, ChenxuX <chenxux...@intel.com> > Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo...@intel.com>; Yang, Qiming > <qiming.y...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com> > Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix device hotplug remove > > Hi, > > On 11/07, Di, ChenxuX wrote: > >Hi, Xiaolong > > > >About pf and vf for fm10k, e1000, igb, ixgbe, ice, i40e; only i40e pf > >and ixgbe vf use > > For fm10k, e1000, igb, ice, please check whether they have called > rte_eth_dev_release_port in the remove ops. >
The function rte_eth_dev_pci_generic_remove will call rte_eth_dev_release_port After the uninit function of drivers. > >Rte_eth_dev_destory() in their remove function, others have already use the > generic remove function. > > > >I have send another patch about ixgbe because they fix different commits. > > For i40e and ixgbe, please address the comments I raised in previous mail. > When app detach a port without a close, it will call the remove function, What will uninit the port and rte_eth_dev_release_port. Thx Di Chenxu > Thanks, > Xiaolong > > > > >Thanks > >Di Chenxu > > > >> -----Original Message----- > >> From: Ye, Xiaolong > >> Sent: Thursday, November 7, 2019 10:50 AM > >> To: Di, ChenxuX <chenxux...@intel.com> > >> Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo...@intel.com>; Yang, Qiming > >> <qiming.y...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com> > >> Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix device hotplug > >> remove > >> > >> On 11/06, Di ChenxuX wrote: > >> >testpmd will occur infinite loops when device hotplug remove. > >> >We can fix the issue by using the pci generic remove function > >> > > >> >Fixes: ac89d46096d5 ("net/i40e: release port upon close") > >> > > >> >Signed-off-by: Di ChenxuX <chenxux...@intel.com> > >> > > >> >v2: > >> >change the code in driver. > >> >--- > >> > drivers/net/i40e/i40e_ethdev.c | 12 +----------- > >> > 1 file changed, 1 insertion(+), 11 deletions(-) > >> > > >> >diff --git a/drivers/net/i40e/i40e_ethdev.c > >> >b/drivers/net/i40e/i40e_ethdev.c index 77a46832c..64842867d 100644 > >> >--- a/drivers/net/i40e/i40e_ethdev.c > >> >+++ b/drivers/net/i40e/i40e_ethdev.c > >> >@@ -694,17 +694,7 @@ eth_i40e_pci_probe(struct rte_pci_driver > >> >*pci_drv __rte_unused, > >> > > >> > static int eth_i40e_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, > >> i40e_vf_representor_uninit); > >> >- else > >> >- return rte_eth_dev_destroy(ethdev, eth_i40e_dev_uninit); > >> >+ return rte_eth_dev_pci_generic_remove(pci_dev, > >> >+eth_i40e_dev_uninit); > >> > >> What about i40e_vf_representor_uninit, you also need to take it into > >> consideration. > >> > >> And you should also call rte_eth_dev_release_port in remove ops in > >> case user detach a port directly without closing it first. > >> > >> This comment also applies your ixgbe fix. > >> > >> > >> Thanks, > >> Xiaolong > >> > >> > >> > } > >> > > >> > static struct rte_pci_driver rte_i40e_pmd = { > >> >-- > >> >2.17.1 > >> >