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 693B0A0093; Wed, 27 May 2020 13:48:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 139381C43C; Wed, 27 May 2020 13:48:23 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 829F71BE9B; Wed, 27 May 2020 13:48:21 +0200 (CEST) IronPort-SDR: Rrv6Q4/0Rs7JS76QusJP+9W9ghgf2gq454JNhOD41ZLN37VlGzWHgQ+mvT4l2VmqCIcBrjE3HE bWDc73obHUtA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2020 04:48:20 -0700 IronPort-SDR: DEFbymNeh2HoKfog6MdCmH2Thl9RcIUzz3BbViwPCoxveqM5UjaTGV/8InhJpswg0G4IMlKiqv zPuKMzKTs75g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,441,1583222400"; d="scan'208";a="442490899" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga005.jf.intel.com with ESMTP; 27 May 2020 04:48:20 -0700 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 May 2020 04:48:20 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX153.amr.corp.intel.com (10.22.226.247) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 May 2020 04:48:19 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 May 2020 04:48:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DlW7l/NbyUl4S20j892ig3Z7yIPpkSxKtzQ58h3uuwLPuEmzmgdi2UlpNVkOxlkWxaCwaWc1kvXhxBQHS+QPVdGLrJnz2W/mbendn60BZ4PVNIPo+t0rezf7YkaoSoDT0cQscnClN4V0ON2bE9H3Duu+7fO/lZ8it22oqJrV/75cFDLXjlLzp6Noe8/56KwssiV3UqpwWXXdrMTf8APpVPfgC/zdez/gNmlDWfXLPCZjxBuMU2L/l7mTR7hJhNm1SC674FfhOQ4aECxlpc7mHjIqrYsN2l/rwmGzRy7MWFxj/AJU1W1sR8NgYqLDHEBKkEJ2GztU7BU1nRqOI/+v7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fwZxmgKTCPsxQpV8MkS/hIuT+s1Gu6LOebhFCWgBCwc=; b=hF+ZH0028QfnTVDFBt4+nTnzd0f5XOgaJWOxaXjxvzTOCi0oJTRjo8hEPo2pUn76G8nUb7zL+Hfzh07L9szXESm1QndYzQDU1VaoS0OD7LuGF8bprbqFs01c1N59suKRe0SBgCIg1tbMeCXY+Rv/xBmz1A3D3B8frq0F5a/ndBxNLQByYQ5AAC71mpMYvPc7Y0uf0G2UC9zbGR9CO/pvSCKqKV8VHsYdRS5M1N9yekACFUyoDg4PmvuF1snbykdWk+FTRAdRLrDZXjS2ot+f84AqLbSUwgjQGv4yFF37CG9EZRbzEVEVWSPpIpqj4ybBScPyO/w0E37nXXwoeOHIGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fwZxmgKTCPsxQpV8MkS/hIuT+s1Gu6LOebhFCWgBCwc=; b=d2FBUERHGhNrYNTwMncoXB5EkLjwjLgT9VGzpYRlV8OE8m2ChuXmut1Lb8FSlviN6befTWXxK4yx9LAz4dlg7mOG5BOk/flbkVl5NRI6R6sk9ZFbrpA6tl3hL1GxEknGVdV7aQTGHBwmIS0yeAKYwqcO7C+NAgoEKGmnle7ghQc= Received: from BN6PR11MB0067.namprd11.prod.outlook.com (2603:10b6:405:62::33) by BN6PR11MB1907.namprd11.prod.outlook.com (2603:10b6:404:105::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 11:48:18 +0000 Received: from BN6PR11MB0067.namprd11.prod.outlook.com ([fe80::7851:b091:650a:cc10]) by BN6PR11MB0067.namprd11.prod.outlook.com ([fe80::7851:b091:650a:cc10%3]) with mapi id 15.20.3021.029; Wed, 27 May 2020 11:48:18 +0000 From: "Singh, Jasvinder" To: Hrvoje Habjanic , "dev@dpdk.org" CC: dpdk stable Thread-Topic: [dpdk-dev] [PATCH] rte_sched: correctly free allocated subport memory Thread-Index: AQHWM4K0RQr1Bx5Qfk6VZDSlvWDSXai7zq7w Date: Wed, 27 May 2020 11:48:18 +0000 Message-ID: References: <20200526172455.6457-1-hrvoje.habjanic@zg.ht.hr> In-Reply-To: <20200526172455.6457-1-hrvoje.habjanic@zg.ht.hr> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: zg.ht.hr; dkim=none (message not signed) header.d=none;zg.ht.hr; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.178] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8427084d-7add-4377-76f2-08d80233d96b x-ms-traffictypediagnostic: BN6PR11MB1907: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 04163EF38A x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ONGsrFAYANDw0jAVVsnUaTLShCdF44/a5UvlU7Q7vSFbi7ymmUSZrSNNm3TxsqQf2P3dpQ20YWpQVi4PaX7VtgYSqorFS4crufX1fdn4bpqrgtmgcF4UIvLF/Aovy0TBpo5+OFTooDJomwlHTJywAXWUYa5Qv96HTR3bVcmHkeHdZpu74S5lKMX+Lqbb6bv+pujfaNcHtRUTWVTqHeyWk9bco7EpMYy5hbpw98qfJxkFwiYzBxWt4pz2KGOAaXOCbJ5v5l/ZGq6SmtvTVnYAr4zRj488aPg1xtGsEe/caxSRkEewQgdQEhRzD3XiNY5fu3SXfTsFb7+rT+CZ+f9UrA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0067.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(366004)(39860400002)(376002)(396003)(346002)(6506007)(316002)(186003)(86362001)(8936002)(53546011)(4326008)(66946007)(76116006)(83380400001)(66476007)(66446008)(5660300002)(2906002)(64756008)(33656002)(66556008)(52536014)(26005)(71200400001)(55016002)(9686003)(7696005)(478600001)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: y/TkrGdcd33OttUOtnDaYCm5xLWPUL9FCfpI7ZqtpTtHlgIpVrVzEy9YJi0P6zUTRhTfPthYOr2OUr/sIz+XiTGd1yP08J8j8lwjJnP117ohz9gusuwYeRHIy97gWKXHPjd3SB6XJzKfYo8zA2AdoTQjbzuTFaRuSPMpd+kNNuLu900ORkwaTpNZo37pBpHzDu6PZcNjPh4uPaeQdkk/3rGprRgrRUGL9cScybTeP7aq/Wu8ex5EwgalDnAQ1Q72BI7vxxE5x76+u2HCGcT/Y6yl8I5pVLO5zcFew7dyC86wTnxBNSmm7SCn7RdzUVD92e1iJ0fK0WFqWZRa8pJ4FbPsxGxp5sFjQcM77XVfPHYeVk5Nta8xrkhmNHJJl5WS3pB2vBXDabCP2sg2iyudcCKlibHYTlemOJiDKWCSARfBbzKz/FoeMmYUoFtIcf/engom0FUhXqmA1qZVtPKfcH+YqRCgxwZqFeScbHeevZJfSSpMn4ECmKBDoDN3lLcP x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 8427084d-7add-4377-76f2-08d80233d96b X-MS-Exchange-CrossTenant-originalarrivaltime: 27 May 2020 11:48:18.6611 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bJs0okRU4qjCDfMJs/vmqmhZBQikTexv9q4DailKRUH7xv8hXoRx5IVVi1oxdp9bxsHVbMD18YD/m3t2uI3+RzCgkhKwA1yfF1omzxeU8nk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1907 X-OriginatorOrg: intel.com 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" > -----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 >=20 > In function rte_sched_subport_free (lib/librte_sched/rte_sched.c, line 86= 5), > there is code to free all allocated stuff related to scheduler subport. F= irst > there are some checks, and in the end, rte_bitmap_free is called. >=20 > 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 f= reed. >=20 > This patch fixes this by removing call to rte_bitmap_free, and instead ca= lling > rte_free. >=20 > Signed-off-by: Hrvoje Habjanic > --- > lib/librte_sched/rte_sched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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, > } > } >=20 > - rte_bitmap_free(subport->bmp); > + rte_free(subport); > } >=20 > void > -- > 2.17.1 Hi Hrvoje; I guess this is your first patch to dpdk.org, here are some suggestions whe= n you send bug fixes; - When sending fixes, please use "fix" word in the subject line, e.g- rte_s= ched: fix subport memory leak - The commit message should include commit id corresponding to the line tha= t you fixes as shown below for this case.=20 Fixes: d9213b829a31 ("sched: remove pipe params config from port level") Patch looks good to me. Acked-by: Jasvinder Singh