DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: fix segment fault
@ 2019-01-30  8:23 Qi Zhang
  2019-02-01  1:35 ` Lu, Wenzhuo
  0 siblings, 1 reply; 3+ messages in thread
From: Qi Zhang @ 2019-01-30  8:23 UTC (permalink / raw)
  To: wenzhuo.lu, qiming.yang; +Cc: dev, Qi Zhang

Fix segment fault when detach a device due to some redundant function
call in ice_dev_uninit.

Fixes: f9cf4f864150 ("net/ice: support device initialization")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 6ab66faeb..6b0113b37 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1458,15 +1458,14 @@ ice_dev_close(struct rte_eth_dev *dev)
 
 	ice_res_pool_destroy(&pf->msix_pool);
 	ice_release_vsi(pf->main_vsi);
-
+	ice_sched_cleanup_all(hw);
+	rte_free(hw->port_info);
 	ice_shutdown_all_ctrlq(hw);
 }
 
 static int
 ice_dev_uninit(struct rte_eth_dev *dev)
 {
-	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 
@@ -1486,11 +1485,6 @@ ice_dev_uninit(struct rte_eth_dev *dev)
 	rte_intr_callback_unregister(intr_handle,
 				     ice_interrupt_handler, dev);
 
-	ice_release_vsi(pf->main_vsi);
-	ice_sched_cleanup_all(hw);
-	rte_free(hw->port_info);
-	ice_shutdown_all_ctrlq(hw);
-
 	return 0;
 }
 
-- 
2.13.6

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

* Re: [dpdk-dev] [PATCH] net/ice: fix segment fault
  2019-01-30  8:23 [dpdk-dev] [PATCH] net/ice: fix segment fault Qi Zhang
@ 2019-02-01  1:35 ` Lu, Wenzhuo
  2019-02-13  3:26   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Lu, Wenzhuo @ 2019-02-01  1:35 UTC (permalink / raw)
  To: Zhang, Qi Z, Yang, Qiming; +Cc: dev

Hi,

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Wednesday, January 30, 2019 4:24 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH] net/ice: fix segment fault
> 
> Fix segment fault when detach a device due to some redundant function call
> in ice_dev_uninit.
> 
> Fixes: f9cf4f864150 ("net/ice: support device initialization")
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

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

* Re: [dpdk-dev] [PATCH] net/ice: fix segment fault
  2019-02-01  1:35 ` Lu, Wenzhuo
@ 2019-02-13  3:26   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-02-13  3:26 UTC (permalink / raw)
  To: Lu, Wenzhuo, Yang, Qiming; +Cc: dev



> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Friday, February 1, 2019 9:36 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] net/ice: fix segment fault
> 
> Hi,
> 
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Wednesday, January 30, 2019 4:24 PM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
> > <qiming.yang@intel.com>
> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [PATCH] net/ice: fix segment fault
> >
> > Fix segment fault when detach a device due to some redundant function
> > call in ice_dev_uninit.
> >
> > Fixes: f9cf4f864150 ("net/ice: support device initialization")
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2019-02-13  3:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30  8:23 [dpdk-dev] [PATCH] net/ice: fix segment fault Qi Zhang
2019-02-01  1:35 ` Lu, Wenzhuo
2019-02-13  3:26   ` Zhang, Qi Z

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