[dpdk-stable] patch 'net/bnxt: free memory allocated for VF	filters' has been queued to LTS release 17.11.3
    Yuanhan Liu 
    yliu at fridaylinux.org
       
    Sun May  6 08:36:30 CEST 2018
    
    
  
Hi,
FYI, your patch has been queued to LTS release 17.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/09/18. So please
shout if anyone has objections.
Thanks.
	--yliu
---
>From 45d2281f87735421a083b4fee4cde1ceb7d653b5 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Mon, 16 Apr 2018 18:11:23 -0700
Subject: [PATCH] net/bnxt: free memory allocated for VF filters
[ upstream commit f11fd694a84a3108b93aaf807f1d1f12cb112ac4 ]
Memory allocated to hold VF filter info is not being freed currently.
This can cause potential memory leak.
Fixes: 7a5b0874440e ("net/bnxt: support to add a VF MAC address")
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_filter.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 32af60612..8d3ddf1d2 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -159,6 +159,14 @@ void bnxt_free_filter_mem(struct bnxt *bp)
 
 	rte_free(bp->filter_info);
 	bp->filter_info = NULL;
+
+	for (i = 0; i < bp->pf.max_vfs; i++) {
+		STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
+			rte_free(filter);
+			STAILQ_REMOVE(&bp->pf.vf_info[i].filter, filter,
+				      bnxt_filter_info, next);
+		}
+	}
 }
 
 int bnxt_alloc_filter_mem(struct bnxt *bp)
-- 
2.11.0
    
    
More information about the stable
mailing list