DPDK 22.11 - How to fix memory leak for KNI - How to debug
Stephen Hemminger
stephen at networkplumber.org
Mon May 8 18:18:45 CEST 2023
On Mon, 8 May 2023 09:01:41 +0300
Yasin CANER <yasinncaner at gmail.com> wrote:
> Hello Stephen,
>
> Thank you for response, it helps me a lot. I understand problem better.
>
> After reading mbuf library (
> https://doc.dpdk.org/guides/prog_guide/mempool_lib.html) i realized that
> 31 units allocation memory slot doesn't return to pool!
If receive burst returns 1 mbuf, the other 31 pointers in the array
are not valid. They do not point to mbufs.
> 1 unit mbuf can be freed via rte_pktmbuf_free so it can back to pool.
>
> Main problem is that allocation doesn't return to original pool, act as
> used. So, after following rte_pktmbuf_free
> <http://doc.dpdk.org/api/rte__mbuf_8h.html#a1215458932900b7cd5192326fa4a6902>
> function,
> i realized that there is 2 function to helps to mbufs back to pool.
>
> These are rte_mbuf_raw_free
> <http://doc.dpdk.org/api/rte__mbuf_8h.html#a9f188d53834978aca01ea101576d7432>
> and rte_pktmbuf_free_seg
> <http://doc.dpdk.org/api/rte__mbuf_8h.html#a006ee80357a78fbb9ada2b0432f82f37>.
> I will focus on them.
>
> If there is another suggestion, I will be very pleased.
>
> Best regards.
>
> Yasin CANER
> Ulak
More information about the users
mailing list