* [PATCH v6 1/3] net/i40e: fix segmentation fault in close
@ 2017-01-27 10:22 Bernard Iremonger
2017-01-27 13:21 ` [dpdk-stable] " Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Bernard Iremonger @ 2017-01-27 10:22 UTC (permalink / raw)
To: dev, jingjing.wu; +Cc: Bernard Iremonger, stable
Change the order of releasing the vsi's.
Release the vmdq vsi's first, then release the main vsi.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
CC: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
Changes in v6:
Rebased to latest dpdk-next-net
This was previously part of a patchset with testpmd patches.
Sending seperately as the testpmd patches have not been acked yet.
drivers/net/i40e/i40e_ethdev.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a818998..0937dc4 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2017 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -2072,18 +2072,17 @@ i40e_dev_close(struct rte_eth_dev *dev)
/* shutdown and destroy the HMC */
i40e_shutdown_lan_hmc(hw);
- /* release all the existing VSIs and VEBs */
- i40e_fdir_teardown(pf);
- i40e_vsi_release(pf->main_vsi);
-
for (i = 0; i < pf->nb_cfg_vmdq_vsi; i++) {
i40e_vsi_release(pf->vmdq[i].vsi);
pf->vmdq[i].vsi = NULL;
}
-
rte_free(pf->vmdq);
pf->vmdq = NULL;
+ /* release all the existing VSIs and VEBs */
+ i40e_fdir_teardown(pf);
+ i40e_vsi_release(pf->main_vsi);
+
/* shutdown the adminq */
i40e_aq_queue_shutdown(hw, true);
i40e_shutdown_adminq(hw);
@@ -4374,6 +4373,9 @@ i40e_vsi_release(struct i40e_vsi *vsi)
if (!vsi)
return I40E_SUCCESS;
+ if (!vsi->adapter)
+ return -EFAULT;
+
user_param = vsi->user_param;
pf = I40E_VSI_TO_PF(vsi);
--
2.10.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH v6 1/3] net/i40e: fix segmentation fault in close
2017-01-27 10:22 [PATCH v6 1/3] net/i40e: fix segmentation fault in close Bernard Iremonger
@ 2017-01-27 13:21 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-01-27 13:21 UTC (permalink / raw)
To: Bernard Iremonger, dev, jingjing.wu; +Cc: stable
On 1/27/2017 10:22 AM, Bernard Iremonger wrote:
> Change the order of releasing the vsi's.
> Release the vmdq vsi's first, then release the main vsi.
>
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
>
> CC: stable@dpdk.org
>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Fixes: 3cb446b4aeb2 ("i40e: free vmdq vsi when closing")
Cc: stable@dpdk.org
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-27 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 10:22 [PATCH v6 1/3] net/i40e: fix segmentation fault in close Bernard Iremonger
2017-01-27 13:21 ` [dpdk-stable] " Ferruh Yigit
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.