net/ice: fix flow director counter resource release
authorShougang Wang <shougangx.wang@intel.com>
Wed, 13 Nov 2019 01:37:57 +0000 (01:37 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
All the counter resources should be cleaned up when teardown.

Fixes: 0f880c3df192 ("net/ice: add flow director counter resource init/release")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/ice_fdir_filter.c

index 39c0efb..e3b633e 100644 (file)
@@ -252,6 +252,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;
 }