From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.digiweb.ie (smtp2.digiweb.ie [83.147.160.14]) by dpdk.org (Postfix) with ESMTP id 2E1835932 for ; Wed, 20 Aug 2014 10:52:45 +0200 (CEST) Received: from statler.emutex.com (unknown [92.51.199.138]) by smtp.digiweb.ie (Postfix) with ESMTP id 72B04290171 for ; Wed, 20 Aug 2014 09:56:16 +0100 (IST) Received: from [10.10.70.244] by statler.emutex.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XK1gm-0001us-9F for dev@dpdk.org; Wed, 20 Aug 2014 09:56:16 +0100 Message-ID: <53F462AE.2010509@emutex.com> Date: Wed, 20 Aug 2014 09:56:14 +0100 From: Nicolas Pernas Maradei User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: dev@dpdk.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] mempool re-initialization 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, 20 Aug 2014 08:52:45 -0000 Hi, At mempool creation time you can pass in a callback function to rte_mempool_create() that DPDK will call for every mbuf on the mempool so you can initialize them to your liking. However, there doesn't seem to be a straight forward way do that again once the mempool is already created though. I'm wondering if there's a clean/nice way to re-initialize all mempool's mbufs once the mempool's been created? I was thinking on something like retrieving all mbufs one by one, do my re-initialization and then put them back into the mempool. I'd have to make sure of getting all mbufs out before start putting them back again to avoid the cache, but that'd be OK. Of course this won't be on the fast-path. Is there a cleaner way to do this? Any suggestion? Thanks, Nico. -- Nicolás Pernas Maradei Software Engineer Emutex Ltd.