From c9657ad01f5ab185dcb754d926b7c86581373021 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Fri, 8 Nov 2019 17:40:39 +0800 Subject: [PATCH] net/ice: free HW tables when device closed Free the HW tables during dev_close. Otherwise there will be two issues: 1. Memory won't be freed if the device is detached. 2. Driver can't be initialized correctly after device reset. Fixes: a4c8c48fe3f4 ("net/ice: load OS default package") Cc: stable@dpdk.org Signed-off-by: Qi Zhang Acked-by: Xiaolong Ye --- drivers/net/ice/ice_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 026c4b4d80..34d1263427 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2315,6 +2315,7 @@ 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); + ice_free_hw_tbls(hw); rte_free(hw->port_info); hw->port_info = NULL; ice_shutdown_all_ctrlq(hw); -- 2.20.1