DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] PCAP memory leak in freeing jumbo frames
@ 2016-11-03  9:35 Dror Birkman
  2016-11-03 10:23 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Dror Birkman @ 2016-11-03  9:35 UTC (permalink / raw)
  To: dev; +Cc: Nicolas Pernas Maradei, ferruh.yigit

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?

TIA,
Dror

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] PCAP memory leak in freeing jumbo frames
  2016-11-03  9:35 [dpdk-dev] PCAP memory leak in freeing jumbo frames Dror Birkman
@ 2016-11-03 10:23 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2016-11-03 10:23 UTC (permalink / raw)
  To: Dror Birkman; +Cc: dev, Nicolas Pernas Maradei, ferruh.yigit

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-03 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03  9:35 [dpdk-dev] PCAP memory leak in freeing jumbo frames Dror Birkman
2016-11-03 10:23 ` Bruce Richardson

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).