DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Mrzyglod, DanielX T" <danielx.t.mrzyglod@intel.com>
Subject: Re: [dpdk-dev] [PATCH] sched: fix useless call
Date: Fri, 13 May 2016 11:04:44 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126479BD46D@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <2334631.A0rgQzR3nq@xps13>



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Friday, May 13, 2016 11:12 AM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Mrzyglod, DanielX
> T <danielx.t.mrzyglod@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] sched: fix useless call
> 
> 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?
> 
> I don't understand why we keep a function which does nothing.

Every data type/class/object should have a constructor/create and destructor/free function. This is standard programming practice, right?

This API function is the free function for the bitmap object. Right now there 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 go back and forth with adding / removing API functions as code evolves. It does 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.

      reply	other threads:[~2016-05-13 11:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 10:11 Daniel Mrzyglod
2016-05-10 17:06 ` Ferruh Yigit
2016-05-10 17:18 ` Dumitrescu, Cristian
2016-05-11  9:46   ` Ferruh Yigit
2016-05-13 10:12     ` Thomas Monjalon
2016-05-13 11:04       ` Dumitrescu, Cristian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EB4FA525960D640B5BDFFD6A3D89126479BD46D@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=danielx.t.mrzyglod@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).