summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Iremonger <bernard.iremonger@intel.com>2015-07-03 15:03:55 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-07-19 21:28:46 +0200
commit3cb446b4aeb2394d19ecbea7c64367453c26be34 (patch)
tree14cb22cdabeb6633619b3ff41937b866cd7b066a
parentd42aaf30008bfaaac41da23cb1fe2ec4f6e90eb5 (diff)
downloaddpdk-3cb446b4aeb2394d19ecbea7c64367453c26be34.zip
dpdk-3cb446b4aeb2394d19ecbea7c64367453c26be34.tar.gz
dpdk-3cb446b4aeb2394d19ecbea7c64367453c26be34.tar.xz
i40e: free vmdq vsi when closing
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
-rw-r--r--drivers/net/i40e/i40e_ethdev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ca435d8..62e5572 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1063,6 +1063,7 @@ i40e_dev_close(struct rte_eth_dev *dev)
struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint32_t reg;
+ int i;
PMD_INIT_FUNC_TRACE();
@@ -1080,6 +1081,14 @@ i40e_dev_close(struct rte_eth_dev *dev)
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;
+
/* shutdown the adminq */
i40e_aq_queue_shutdown(hw, true);
i40e_shutdown_adminq(hw);