All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Vyal <dmitryvyal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: AndyChen <andychenzy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: How to free a ring?
Date: Wed, 11 Sep 2013 13:07:35 +0400	[thread overview]
Message-ID: <523032D7.4020004@gmail.com> (raw)
In-Reply-To: <CAHhF9PG+s4Kxgco8VsD+PNsT1SimuYTfkVyXcDhZPqbX1Ez1WA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 09/11/2013 11:46 AM, AndyChen wrote:
> Dpdk hasn't API to free ring/memzone/mempool, what's the scene you 
> must free the ring?
>
Well, I'm writing a packet defragmenting code. I have a data structure 
consisting of a rte_hash, a rte_ring and an array allocated with 
rte_zmalloc. All these besides the ring can be freed. So looks like I 
can't destruct my object after allocating. Strictly speaking, I don't 
have to. The need shouldn't arise in normal situation. I just considered 
writing allocating/deallocating function pairs and processing all 
allocation errors to be a good practice.

Isn't it a bit strange to have rte_hash_free() and not have 
rte_ring_free()? What's the reason for this?

Best wishes,
Dmitry

  parent reply	other threads:[~2013-09-11  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11  7:37 How to free a ring? Dmitry Vyal
     [not found] ` <52301DA2.2060806-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-11  7:46   ` AndyChen
     [not found]     ` <CAHhF9PG+s4Kxgco8VsD+PNsT1SimuYTfkVyXcDhZPqbX1Ez1WA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-11  9:07       ` Dmitry Vyal [this message]
2013-09-11  7:57   ` mydpdk

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=523032D7.4020004@gmail.com \
    --to=dmitryvyal-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=andychenzy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.