From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4E6C495C8 for ; Fri, 13 May 2016 13:04:50 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 13 May 2016 04:04:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,613,1455004800"; d="scan'208";a="702204535" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by FMSMGA003.fm.intel.com with ESMTP; 13 May 2016 04:04:45 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.241]) by IRSMSX101.ger.corp.intel.com ([169.254.1.19]) with mapi id 14.03.0248.002; Fri, 13 May 2016 12:04:44 +0100 From: "Dumitrescu, Cristian" To: Thomas Monjalon CC: "dev@dpdk.org" , "Yigit, Ferruh" , "Mrzyglod, DanielX T" Thread-Topic: [dpdk-dev] [PATCH] sched: fix useless call Thread-Index: AQHRrP/7AraAbhzBnkOORFvLu4GJnp+2siTA Date: Fri, 13 May 2016 11:04:44 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126479BD46D@IRSMSX108.ger.corp.intel.com> References: <1462875064-119474-1-git-send-email-danielx.t.mrzyglod@intel.com> <3EB4FA525960D640B5BDFFD6A3D89126479BAF1D@IRSMSX108.ger.corp.intel.com> <5732FF68.50801@intel.com> <2334631.A0rgQzR3nq@xps13> In-Reply-To: <2334631.A0rgQzR3nq@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTc2Y2M0OWYtOWQ0MC00YzM0LWFjYWMtYzFiODcxNzhjNGE5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InVUa2NaRUllVk4rSHoxM1M1c0d6ZDZteFwvRTlrdGxvZ2ZEY2hDZ1B0T1drPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] sched: fix useless call X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 11:04:51 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, May 13, 2016 11:12 AM > To: Dumitrescu, Cristian > Cc: dev@dpdk.org; Yigit, Ferruh ; Mrzyglod, Danie= lX > T > Subject: Re: [dpdk-dev] [PATCH] sched: fix useless call >=20 > 2016-05-11 10:46, Ferruh Yigit: > > On 5/10/2016 6:18 PM, Dumitrescu, Cristian wrote: > > > As previously discussed on this email list, the rte_bitmap_free() is = an API > function that works as a placeholder for any resource freeing that needs = to > be done for the bitmap. The API function should not be removed and also > the call to this function from the rte_sched_port_free() should not be > removed either. > > > > > > > Right now it isn't required and doesn't do anything. > > Why not add this function when it is required? >=20 > I don't understand why we keep a function which does nothing. Every data type/class/object should have a constructor/create and destructo= r/free function. This is standard programming practice, right? This API function is the free function for the bitmap object. Right now the= re are no internally allocated resources to be freed, but as code evolves, = some other internal memory could be allocated by the bitmap, which needs to= be freed in the bitmap free function. This function should be kept in order to have a stable API. We should not g= o back and forth with adding / removing API functions as code evolves. It d= oes not make any sense to go through the ABI change process to remove this = API function now just to come back later on and go again through ABI change= to add back this API function later. I think each DPDK object should have its create and free functions clearly = identified in the API.