[v2,3/4] net/ice: fix FDIR counter resource release
diff mbox series

Message ID 20191107022217.41046-4-shougangx.wang@intel.com
State Superseded
Delegated to: xiaolong ye
Headers show
Series
  • net/ice: fix memory release in FDIR
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Wang ShougangX Nov. 7, 2019, 2:22 a.m. UTC
All the counter resources should be cleaned up when teardown.

Fixes: 0f880c3df192 ("net/ice: add flow director counter resource init/release")
Cc: stable@dpdk.org

Signed-off-by: Wang ShougangX <shougangx.wang@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 87634e4de..94a6e96df 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -265,6 +265,9 @@  ice_fdir_counter_release(struct ice_pf *pf)
 	for (i = 0; i < container->index_free; i++)
 		rte_free(container->pools[i]);
 
+	TAILQ_INIT(&container->pool_list);
+	container->index_free = 0;
+
 	return 0;
 }