[PATCH v2 2/7] net/ice: fix resource leaks on port close
Anurag Mandal
anurag.mandal at intel.com
Mon Nov 2 09:10:32 CET 2026
ice_dev_close() tears down the hardware state rather than with
ice_deinit_hw(), and misses part of it.
The switch filter management structures, the DDP package copy
and any remaining VSI contexts are never freed, and the flow
director counter block, allocated by ice_init_hw(), is never
given back to the firmware.
As ice_dev_reset() is a close followed by an init, the memory
also leaks on every port reset.
Call ice_deinit_hw() instead.
Fixes: f9cf4f864150 ("net/ice: support device initialization")
Fixes: 9c4f15901ada ("net/ice: free memory with matching allocator")
Cc: stable at dpdk.org
Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
---
drivers/net/intel/ice/ice_ethdev.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 4c21356736..4abc0c3544 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -3109,13 +3109,9 @@ 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);
- ice_free(hw, hw->port_info);
- hw->port_info = NULL;
+ ice_deinit_hw(hw);
free((void *)(uintptr_t)ad->devargs.ddp_filename);
ad->devargs.ddp_filename = NULL;
- ice_shutdown_all_ctrlq(hw, true);
rte_free(pf->proto_xtr);
pf->proto_xtr = NULL;
--
2.25.1
More information about the stable
mailing list