DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix a wrong bitmap free call
@ 2020-07-28 12:50 chenmin.sun
  2020-07-29  0:07 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: chenmin.sun @ 2020-07-28 12:50 UTC (permalink / raw)
  To: qi.z.zhang, beilei.xing; +Cc: dev, chenmin.sun

From: Chenmin Sun <chenmin.sun@intel.com>

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 <chenmin.sun@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 05d5f2861..a17bc9bab 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix a wrong bitmap free call
  2020-07-28 12:50 [dpdk-dev] [PATCH] net/i40e: fix a wrong bitmap free call chenmin.sun
@ 2020-07-29  0:07 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2020-07-29  0:07 UTC (permalink / raw)
  To: Sun, Chenmin, Xing, Beilei; +Cc: dev



> -----Original Message-----
> From: Sun, Chenmin <chenmin.sun@intel.com>
> Sent: Tuesday, July 28, 2020 8:51 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Sun, Chenmin <chenmin.sun@intel.com>
> Subject: [PATCH] net/i40e: fix a wrong bitmap free call
> 
> From: Chenmin Sun <chenmin.sun@intel.com>
> 
> This patch fixes the coverity warning #361024.
> rte_bitmap_free() is not a right way to free a bitmap, replacing it with
> rte_free().
> 

Coverity issue: 361024
Fixes: febc61d350bf ("net/i40e: optimize flow director update rate")

> Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

> ---
>  drivers/net/i40e/i40e_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 05d5f2861..a17bc9bab 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-29  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 12:50 [dpdk-dev] [PATCH] net/i40e: fix a wrong bitmap free call chenmin.sun
2020-07-29  0:07 ` Zhang, Qi Z

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git