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 AA81E42A99 for ; Mon, 8 May 2023 18:18:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 997E1410ED; Mon, 8 May 2023 18:18:49 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 3DEC040685 for ; Mon, 8 May 2023 18:18:48 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1aaea3909d1so44493725ad.2 for ; Mon, 08 May 2023 09:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683562727; x=1686154727; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=JNDt7ealXsm4zPAT91y8EZ+raIotw3UOrppvIjYXpLk=; b=CAhQYd286D10B/RPC/vMxizUXruva6S3LqAA81qJ+K8JHCZ03u6RJUxlJWGEvRgWoy ITt+yanj+GFHPS86XrXHFeIM2pvbZ6q5WSaEZY3FiXHaExRwwyH2vINPUQuxL1O1+Vc9 EphAdrPmfkypqdsv2wjhPGaCn8QJASmgKahoap1taru+ucdarjrUvJlEVXHcR2oXrt3S 1bQYeGnWpHPBgrllTIWzEwjGAh0D1AT6UcRQJQ2OGhPGIX8BAf6vuM5tzdgQtGiadrGR eFe9qVC6uuZ+UfV5tNG159h28zs0beG2MmTtvzw/ZPwiABR/PM5CLObpju2t9VCSBMjo jS0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683562727; x=1686154727; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JNDt7ealXsm4zPAT91y8EZ+raIotw3UOrppvIjYXpLk=; b=GMmB/v/29gOso5k4Oxr2tvI2cYFgJvm2jHwiDJsABJ6BJ7eVoFEXvCI5wvgFwdareO wARWAvIlZ7V5k3anRcAOilgU9SDxAGUADyIRI3m0KJSqwjd07mcQXbjvd5D1ythVmyM8 MXInb3FcKNX74FtXumiDfu1QCsBKM3PadAZx4TWxkuZGzD4M6K8e6yoLfN5wbzdz3pSQ 2GCMYUzkXgm+kx7uDSNP35Fv0HbbMG9ck38B6R0iW8XOs+RxUe2B8c9Yy/m6XEDrLczz JwrW6HGrZK+IVXV8Vmv7OH9TgElutv5M8+dXY+jdXBnw2tXMFZJhO9pynaimaR2C0IJf 1z1g== X-Gm-Message-State: AC+VfDyiPCP+MKNwkDifJzhwOJGJFdC41BkvCPAHTqum1w+lLlQld0Hu ZFJSgI5BNIvQPRbRN7fv0Z7rne0T7j5W+tWcESxkiQ== X-Google-Smtp-Source: ACHHUZ4ifCwXAzavL6Y95ZM1a4s2SVcM+M6kkru+dy7b6AjnF7o7dbgZ/X1e12CvouRzB+6yOlYnFA== X-Received: by 2002:a17:903:1110:b0:1a6:8ed5:428a with SMTP id n16-20020a170903111000b001a68ed5428amr12787770plh.22.1683562727341; Mon, 08 May 2023 09:18:47 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jk1-20020a170903330100b0019e60c645b1sm7499950plb.305.2023.05.08.09.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 09:18:47 -0700 (PDT) Date: Mon, 8 May 2023 09:18:45 -0700 From: Stephen Hemminger To: Yasin CANER Cc: users@dpdk.org Subject: Re: DPDK 22.11 - How to fix memory leak for KNI - How to debug Message-ID: <20230508091845.646caf17@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 8 May 2023 09:01:41 +0300 Yasin CANER 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 > > 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