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 A6CBD42ABE;
Tue, 9 May 2023 16:24:27 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
by mails.dpdk.org (Postfix) with ESMTP id 3788F42D31;
Tue, 9 May 2023 16:24:27 +0200 (CEST)
Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178])
by mails.dpdk.org (Postfix) with ESMTP id A716A41151
for ; Tue, 9 May 2023 16:24:26 +0200 (CEST)
Received: by inbox.dpdk.org (Postfix, from userid 33)
id 8408442ABF; Tue, 9 May 2023 16:24:26 +0200 (CEST)
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 1227] KNI : memory-leaks, each time kni_rx_burst it is
allocates new mbufs even if no needs.
Date: Tue, 09 May 2023 14:24:26 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: ethdev
X-Bugzilla-Version: 22.11
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: yasinncaner@gmail.com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: Normal
X-Bugzilla-Assigned-To: dev@dpdk.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
op_sys bug_status bug_severity priority component assigned_to reporter
target_milestone attachments.created
Message-ID:
Content-Type: multipart/alternative; boundary=16836422660.D0f4.2392870
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
MIME-Version: 1.0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dev-bounces@dpdk.org
--16836422660.D0f4.2392870
Date: Tue, 9 May 2023 16:24:26 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
https://bugs.dpdk.org/show_bug.cgi?id=3D1227
Bug ID: 1227
Summary: KNI : memory-leaks, each time kni_rx_burst it is
allocates new mbufs even if no needs.
Product: DPDK
Version: 22.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: yasinncaner@gmail.com
Target Milestone: ---
Created attachment 251
--> https://bugs.dpdk.org/attachment.cgi?id=3D251&action=3Dedit
flow_kni_rx_burst
Hello
I tried to explain memory-leak via graph=20
https://pastebin.ubuntu.com/p/s4h5psqtgZ/
scenario :=20
1. kni_alloc allocates 32 units (kni->alloc_q) then completes initialization
2. rte_kni_rx_burst receive 1 packet from kernel. 1 of 31 units is filled by
message, 31 units is empty but it is allocated in kni->alloc_q.
3. rte_kni_rx_burst then allocates another 32 units i dont know why but the=
re
is a comment like this."If buffers removed, allocate mbufs and then put them
into alloc_q" ( How to tests buffers are removed or not? there is not any q=
uery
in code)
4. 1 message mbuf is transmited via rte_eth_tx_burst .=20
5. 1 message mbuf never back to freed and back to original memory pool. 31+=
32
units memory act like in use but they are not. never back to original memory
pool
6. this cycle goes on to 2 .
? Why there is newer allocation in rte_kni_rx_burst i dont know.
? I tried to free 1 packet via rte_pktmbuf_free but sometimes corrupt to po=
ol
like below. sometimes 1 packet/unit back to original memory pool
[UseCount_mpool:65][avail_mpool:10334]
[UseCount_mpool:4294967135][avail_mpool:10560]
? In my view, after transmiting message to mbufs should be in to kni->free_=
q.
? in my view, there is missing query in func kni_allocate_mbufs to test all=
oc_q
is empty or not.
Best regards.
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--16836422660.D0f4.2392870
Date: Tue, 9 May 2023 16:24:26 +0200
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
KNI : memory-leaks, each time kni_rx_burst it is allocates ne=
w mbufs even if no needs.
Product
DPDK
Version
22.11
Hardware
All
OS
All
Status
UNCONFIRMED
Severity
normal
Priority
Normal
Component
ethdev
Assignee
dev@dpdk.org
Reporter
yasinncaner@gmail.com
Target Milestone
---
Created attachment 251[details]
flow_kni_rx_burst
Hello
I tried to explain memory-leak via graph=20
https://pastebin.ubun=
tu.com/p/s4h5psqtgZ/
scenario :=20
1. kni_alloc allocates 32 units (kni->alloc_q) then completes initializa=
tion
2. rte_kni_rx_burst receive 1 packet from kernel. 1 of 31 units is filled by
message, 31 units is empty but it is allocated in kni->alloc_q.
3. rte_kni_rx_burst then allocates another 32 units i dont know why but the=
re
is a comment like this."If buffers removed, allocate mbufs and then pu=
t them
into alloc_q" ( How to tests buffers are removed or not? there is not =
any query
in code)
4. 1 message mbuf is transmited via rte_eth_tx_burst .=20
5. 1 message mbuf never back to freed and back to original memory pool. 31+=
32
units memory act like in use but they are not. never back to original memory
pool
6. this cycle goes on to 2 .
? Why there is newer allocation in rte_kni_rx_burst i dont know.
? I tried to free 1 packet via rte_pktmbuf_free but sometimes corrupt to po=
ol
like below. sometimes 1 packet/unit back to original memory pool
[UseCount_mpool:65][avail_mpool:10334]
[UseCount_mpool:4294967135][avail_mpool:10560]
? In my view, after transmiting message to mbufs should be in to kni->fr=
ee_q.
? in my view, there is missing query in func kni_allocate_mbufs to test all=
oc_q
is empty or not.
Best regards.