DPDK usage discussions
 help / color / mirror / Atom feed
From: Yasin CANER <yasinncaner@gmail.com>
To: users@dpdk.org,
	"stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: DPDK 22.11 - How to fix memory leak for KNI - How to debug
Date: Mon, 8 May 2023 09:01:41 +0300	[thread overview]
Message-ID: <CAP5epcPSOOcuWO9-qw9MNd99FcgZ4v=_91Y49G8VBATZaLELTA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

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!

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

[-- Attachment #2: Type: text/html, Size: 1569 bytes --]

             reply	other threads:[~2023-05-08  6:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08  6:01 Yasin CANER [this message]
2023-05-08 16:18 ` Stephen Hemminger
2023-05-09 11:13   ` Yasin CANER
2023-05-11 14:14     ` Yasin CANER
2023-05-17 17:53     ` Ferruh Yigit
2023-05-18  8:14       ` Yasin CANER
2023-05-18 14:56         ` Ferruh Yigit
2023-05-19 17:47           ` Yasin CANER
2023-05-19 18:43             ` Ferruh Yigit
2023-05-29  6:33               ` Yasin CANER
  -- strict thread matches above, loose matches on Subject: below --
2023-05-04  7:32 Yasin CANER
2023-05-04 13:00 ` Yasin CANER
2023-05-04 16:14   ` Stephen Hemminger

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='CAP5epcPSOOcuWO9-qw9MNd99FcgZ4v=_91Y49G8VBATZaLELTA@mail.gmail.com' \
    --to=yasinncaner@gmail.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.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 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).