net/i40e: fix a wrong bitmap free call
PATCH 1/1 net/i40e: fix a wrong bitmap free call
From: Chenmin Sun <[email protected]>
This patch fixes the coverity warning #361024. rte_bitmap_free() is not a right way to free a bitmap, replacing it with rte_free().
Signed-off-by Chenmin Sun <[email protected]>
--- drivers/net/i40e/i40e_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev.c +1 -1
@@ -1870,7 +1870,7 @@ i40e_fdir_memory_cleanup(struct i40e_pf *pf)if (fdir_info->hash_table)rte_hash_free (fdir_info->hash_table);if (fdir_info->fdir_flow_pool.bitmap) -rte_bitmap_free (fdir_info->fdir_flow_pool.bitmap); +rte_free (fdir_info->fdir_flow_pool.bitmap);if (fdir_info->fdir_flow_pool.pool)rte_free (fdir_info->fdir_flow_pool.pool);if (fdir_info->fdir_filter_array)
Signature · 1 line
2.17.1
Quoted 9 lines
-----Original Message-----
From: Sun, Chenmin <[email protected]>
Sent: Tuesday, July 28, 2020 8:51 PM
To: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Sun, Chenmin <[email protected]>
Subject: [PATCH] net/i40e: fix a wrong bitmap free call
Quoted 6 lines
From: Chenmin Sun <[email protected]>
This patch fixes the coverity warning #361024.
rte_bitmap_free()is not a right way to free a bitmap, replacing it withrte_free().
Coverity issue: 361024
Fixes febc61d350bf ("net/i40e: optimize flow director update rate")
Quoted 1 line
Signed-off-by Chenmin Sun <[email protected]>
Acked-by Qi Zhang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
Quoted 19 lines
--- drivers/net/i40e/i40e_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/i40e/i40e_ethdev.c +1
-2@@ -1870,7 +1870,7 @@ i40e_fdir_memory_cleanup(struct i40e_pf *pf)if (fdir_info->hash_table)rte_hash_free (fdir_info->hash_table);if (fdir_info->fdir_flow_pool.bitmap) -rte_bitmap_free (fdir_info->fdir_flow_pool.bitmap); +rte_free (fdir_info->fdir_flow_pool.bitmap);if (fdir_info->fdir_flow_pool.pool)rte_free (fdir_info->fdir_flow_pool.pool);if (fdir_info->fdir_filter_array) --2.17.1