From: Bruce Richardson <bruce.richardson@intel.com>
To: Dror Birkman <dror.birkman@lightcyber.com>
Cc: dev@dpdk.org,
Nicolas Pernas Maradei <nicolas.pernas.maradei@emutex.com>,
ferruh.yigit@intel.com
Subject: Re: [dpdk-dev] PCAP memory leak in freeing jumbo frames
Date: Thu, 3 Nov 2016 10:23:09 +0000 [thread overview]
Message-ID: <20161103102308.GA63552@bricha3-MOBL3.ger.corp.intel.com> (raw)
In-Reply-To: <CAMLkaUvupSKK0=5RHPVikVSXgHEioehRpSYpLLcSobOgR+USkA@mail.gmail.com>
On Thu, Nov 03, 2016 at 11:35:14AM +0200, Dror Birkman wrote:
> Hi,
>
> I have a huge memory leak when I release mbufs allocated
> by eth_pcap_rx_jumbo().
>
> I use rte_mempool_put_bulk() to release the mbufs.
> To my horror I found out it puts back to the mempool only the head mbuf and
> not its segments!
>
> I know rte_pktmbuf_free() frees the mbuf and all it segments, but afaik it
> is not thread safe.
>
> What is the thread safe way to free mbufs (preferably in bulk) and their
> segments?
>
I'm not aware of any thread-safety differences between mempool_put and
pktmbuf_free - which in the end just calls mempool_put for each segment.
For freeing mbufs with multiple segments, I think you'll have to use the
regular mbuf_free function, or write your own special bulk version.
/Bruce
prev parent reply other threads:[~2016-11-03 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 9:35 Dror Birkman
2016-11-03 10:23 ` Bruce Richardson [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=20161103102308.GA63552@bricha3-MOBL3.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dror.birkman@lightcyber.com \
--cc=ferruh.yigit@intel.com \
--cc=nicolas.pernas.maradei@emutex.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).