From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26D5842A93 for ; Mon, 8 May 2023 08:03:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 359C442D29; Mon, 8 May 2023 08:03:37 +0200 (CEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id 050E140DDC for ; Mon, 8 May 2023 08:03:35 +0200 (CEST) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-306281edf15so3858480f8f.1 for ; Sun, 07 May 2023 23:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683525814; x=1686117814; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ht9H2dxRWsdTKr2t2M4V/QJdC1fdiL2r0yJiZtZibYI=; b=OtUnQKpu9PEU2/Hl9gLwazwpz99qAwXEhLNH1FzJVGBRqEnv/tKxQp3Hjik8ZvV1Ro VZ5lAaxR1HlpwkoGM5TR6mRzr9T+UaYVFeTrEOUURGH0epnNp8RD8+78w6YSz25x6pVF 8zP/bumuPRLnN/lxrXsUbNd8oKJ7yjMmTWInDiCLo+pHc8bGYI0SjfNmmzLdsedMDU0s Hc3y6S+6UQszHEkEkpObxstD79OEM10kSYIooXAzlF36ykFcxqeLIsZHtFMAkIH4YpqI P7JcibjB+gIqQtcJ6tdRihKPiliXBo9cVgu/XQOdlc7n/81M5yZviQihvFYANPgIVUfA piCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683525814; x=1686117814; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ht9H2dxRWsdTKr2t2M4V/QJdC1fdiL2r0yJiZtZibYI=; b=GE0x0DLQ/RTEQeYe95zyiVIH664o97KRXuJmr+fdctzcSDWtRQ3Mj7/AqCPH4wB4rK Q+Y5kwre/TftACbvbkn8P/s/JskyN8xy5zYGpuTHbey/3dw5ErARGi9GciVlvZHJiYIx M+h5fY2pmENxz5kA44v/yFCICnYZ/7E7V4iDMsOQH5I/xsvAdDrinqOeIwcNHBUYO5o6 zlAhWvdu+iiy0Y7Z0Kzqa46QxDATXeZ2FVrksn+weWSFxn2qaALayqAyYXuOQhX9iTok xXB9po3Kq4XK+Ddjv8c77rjP/EXa3tjGStjKTeAEc0AFDizE8AMz6eEWEimqj8HKIcbs LUjA== X-Gm-Message-State: AC+VfDzOyJQmWkVDHWLgghgUYMmqoaJqYyW+H7mWIaeP9bnG3HCV9Cd0 HPv3DJrzCRYDuI46tKUtQ0IeZsTford6JBV5rtEyuHhiRnU= X-Google-Smtp-Source: ACHHUZ7D2NFpuKQyuZS+LwwbPpaNBwpF9MC3SG3jm4XbGToV5hWCp5UvbIBP0LRfJZY5JkU16+SZrl35TKn7xmigrf0= X-Received: by 2002:a05:6000:1cd:b0:2f7:faa0:3f19 with SMTP id t13-20020a05600001cd00b002f7faa03f19mr7093679wrx.28.1683525814232; Sun, 07 May 2023 23:03:34 -0700 (PDT) MIME-Version: 1.0 From: Yasin CANER Date: Mon, 8 May 2023 09:01:41 +0300 Message-ID: Subject: DPDK 22.11 - How to fix memory leak for KNI - How to debug To: users@dpdk.org, "stephen@networkplumber.org" Content-Type: multipart/alternative; boundary="00000000000020a9e605fb28666f" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --00000000000020a9e605fb28666f Content-Type: text/plain; charset="UTF-8" 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 function, i realized that there is 2 function to helps to mbufs back to pool. These are rte_mbuf_raw_free and rte_pktmbuf_free_seg . I will focus on them. If there is another suggestion, I will be very pleased. Best regards. Yasin CANER Ulak --00000000000020a9e605fb28666f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Stephen,

Thank you for response, = it helps me a lot. I understand problem better.=C2=A0

<= div>After reading mbuf library (https://doc.dpdk.org/guides/prog_guide/mempool_lib= .html)=C2=A0 i realized that 31 units=C2=A0allocation memory slot doesn= 't return to pool!

1 unit mbuf can be freed vi= a rte_pktmbuf_free so it=C2=A0can back to pool.

Ma= in problem is that allocation doesn't return to original pool, act as u= sed. So, after following=C2=A0r= te_pktmbuf_free=C2=A0function, i realized that there is 2 function to h= elps to mbufs back to pool.

These are=C2=A0rte_mbuf_raw_free=C2=A0and=C2=A0rte_pktmbuf_free_seg. I will = focus on them.

If there is another suggestion, I w= ill be very pleased.=C2=A0

Best regards.

Yasin CANER
Ulak
--00000000000020a9e605fb28666f--