From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 252BEA04A3; Sat, 30 May 2020 10:05:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A7301D618; Sat, 30 May 2020 10:05:43 +0200 (CEST) Received: from ls405.t-com.hr (ls405.t-com.hr [195.29.150.135]) by dpdk.org (Postfix) with ESMTP id E59421D5F0; Sat, 30 May 2020 10:05:40 +0200 (CEST) Received: from ls266.t-com.hr (ls266.t-com.hr [195.29.150.94]) by ls405.t-com.hr (Postfix) with ESMTP id E4FD16987BD; Sat, 30 May 2020 10:05:37 +0200 (CEST) Received: from ls266.t-com.hr (localhost.localdomain [127.0.0.1]) by ls266.t-com.hr (Qmlai) with ESMTP id DC79CC58244; Sat, 30 May 2020 10:05:37 +0200 (CEST) X-Envelope-Sender: hrvoje.habjanic@zg.ht.hr Received: from habix.doma (93-138-51-15.adsl.net.t-com.hr [93.138.51.15]) by ls266.t-com.hr (Qmali) with ESMTP id 74ABC12020C; Sat, 30 May 2020 10:05:37 +0200 (CEST) Received: from [192.168.10.192] (habi-doma.doma [192.168.10.192]) by habix.doma (Postfix) with ESMTPSA id 54CF1300; Sat, 30 May 2020 10:05:37 +0200 (CEST) To: "Singh, Jasvinder" , "dev@dpdk.org" Cc: dpdk stable References: <20200526172455.6457-1-hrvoje.habjanic@zg.ht.hr> From: Hrvoje Habjanic Message-ID: <9e7ac418-f06a-3e3e-8883-c41d543f2755@zg.ht.hr> Date: Sat, 30 May 2020 10:05:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-25450.005 X-TM-AS-Result: No--13.498-10.0-31-1 X-imss-scan-details: No--13.498-10.0-31-1 X-TM-AS-User-Approved-Sender: No Subject: Re: [dpdk-dev] [PATCH] rte_sched: correctly free allocated subport memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 27. 05. 2020. 13:48, Singh, Jasvinder wrote: > >> -----Original Message----- >> From: dev On Behalf Of Hrvoje Habjanic >> Sent: Tuesday, May 26, 2020 6:25 PM >> To: dev@dpdk.org >> Subject: [dpdk-dev] [PATCH] rte_sched: correctly free allocated subport >> memory >> >> In function rte_sched_subport_free (lib/librte_sched/rte_sched.c, line 865), >> there is code to free all allocated stuff related to scheduler subport. First >> there are some checks, and in the end, rte_bitmap_free is called. >> >> Now, rte_bitmap_free is a dummy function, and it just checks if provided >> pointer to bitmap is valid or not. So, actual memory for subport is not freed. >> >> This patch fixes this by removing call to rte_bitmap_free, and instead calling >> rte_free. >> >> Signed-off-by: Hrvoje Habjanic >> --- >> lib/librte_sched/rte_sched.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index >> c0983ddda..f15a3b515 100644 >> --- a/lib/librte_sched/rte_sched.c >> +++ b/lib/librte_sched/rte_sched.c >> @@ -888,7 +888,7 @@ rte_sched_subport_free(struct rte_sched_port *port, >> } >> } >> >> - rte_bitmap_free(subport->bmp); >> + rte_free(subport); >> } >> >> void >> -- >> 2.17.1 > Hi Hrvoje; > > I guess this is your first patch to dpdk.org, here are some suggestions when you send bug fixes; Yes, it is. > > - When sending fixes, please use "fix" word in the subject line, e.g- rte_sched: fix subport memory leak > - The commit message should include commit id corresponding to the line that you fixes as shown below for this case. > Fixes: d9213b829a31 ("sched: remove pipe params config from port level") OK, noted, thank you. > Patch looks good to me. Great. As s side note, it would be nice if this could be backported to 19.11 LTS. Regards, H. > > Acked-by: Jasvinder Singh > >