From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <8002onavi@gmail.com> Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by dpdk.org (Postfix) with ESMTP id 3C7B6B36D for ; Wed, 27 Aug 2014 10:36:47 +0200 (CEST) Received: by mail-we0-f176.google.com with SMTP id q58so15722209wes.7 for ; Wed, 27 Aug 2014 01:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=unxWM9E076gLc8TiJY0J8R5L1ywLK4yBFzKcQD5EYsU=; b=Ll4K6YRR4nS+H6QgraFnmLiNXVPY6/7IcuaQsHWv4nWfMSyqFszpOa6reE2CyvEMfA fG00ZLqLa+O7FZapBUD1WixFfxU373eJiBSnzhTFDGgY41izcuS+ZS0RzWIrJJkwTXVM sYhBK4p76EbLX2UsoR2OEgI0ipvWj+LPRiIB8lmw3WVzSe0JzATJwP2jM8p/HQ8PwgWl B7rmxTs94sVHZpG7LsbXy/676dKErKG6+OW9re7Olm2mUeJYFMLq6q9HQnYVxcDoeJ2L bAspfAojfyO0jcnjtAJrCBr+BpAljp6tpitnyjVe2+jZjin/RjnBZcc9nlUuirnfKF5y HJNw== X-Received: by 10.194.184.230 with SMTP id ex6mr20635306wjc.83.1409128850782; Wed, 27 Aug 2014 01:40:50 -0700 (PDT) Received: from localhost.localdomain ([185.27.182.30]) by mx.google.com with ESMTPSA id hf9sm528936wib.11.2014.08.27.01.40.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Aug 2014 01:40:50 -0700 (PDT) Message-ID: <53FD9990.4050709@gmail.com> Date: Wed, 27 Aug 2014 10:40:48 +0200 From: Ivano Cerrato <8002onavi@gmail.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "dev@dpdk.org" Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] KNI Out of memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2014 08:36:47 -0000 Hello, I wrote a code that creates some KNI interfaces, destroys them when some management events occur, and creates new interfaces when other management events happen. What happens is that I create a number of interfaces using "kni_alloc", I destroy ALL of them through "kni_release" and, when I try to create a new one I get the message "KNI out of memory" during the execution of the "kni_alloc". The number of interfaces that I can create/destroy before getting the error depends on the size of the mempool that I specify during the creation of the interfaces themselves. Then, to me it seems that the memory is not properly released when a KNI interface is destroyed. Before invoking "kni_release", I drain all the remaining mbufs in the tx queues. While checking the sources of DPDK, I have seen that indeed this trace only appears when there there are no mbufs available in the mempool. Am I missing something here? Is there any other call necessary to properly release a KNI interface? Just before/after the creation and release of an interface, I print the values obtained by invoking "rte_mempool_count" and "rte_mempool_free_count" on the mempool used for the KNI. What I get is the following: the value obtained with "rte_mempool_count" tends to decrease, while the value get with "rte_mempool_free_count" tends to increase. What is the exact semantic of "rte_mempool_count" and "rte_mempool_free_count"? From the doxygen documentation, it seems that the behaviour should be the opposite. Best regards, Ivano