From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 0928468AE for ; Wed, 23 Jul 2014 20:38:49 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 23 Jul 2014 11:39:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,718,1400050800"; d="scan'208";a="460541547" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by azsmga001.ch.intel.com with ESMTP; 23 Jul 2014 11:39:41 -0700 Received: from irsmsx152.ger.corp.intel.com (163.33.192.66) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 23 Jul 2014 19:39:41 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.62]) by IRSMSX152.ger.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0123.003; Wed, 23 Jul 2014 19:39:41 +0100 From: "Richardson, Bruce" To: Mahdi Dashtbozorgi , "dev@dpdk.org" Thread-Topic: [dpdk-dev] free a memzone Thread-Index: AQHPpaDx6ATPhjiaskySFLo+PBVNsJutTjyAgACxBJA= Date: Wed, 23 Jul 2014 18:39:40 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B0343B1714@IRSMSX103.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] free a memzone 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, 23 Jul 2014 18:38:50 -0000 Rather than freeing the previously allocated memzone, could you not just re= -initialize the mempool using something like rte_mempool_xmem_create? > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Mahdi Dashtbozorgi > Sent: Wednesday, July 23, 2014 2:05 AM > To: dev@dpdk.org > Subject: Re: [dpdk-dev] free a memzone >=20 > Hi guys, >=20 > Is there any suggestion to free the previously allocated memzone? > I really need help in this issue. > Any help is appreciated. >=20 > Best Regards, > Mahdi. >=20 >=20 >=20 > On Tue, Jul 22, 2014 at 4:03 PM, Mahdi Dashtbozorgi > wrote: >=20 > > Hi, > > > > I have two processes, which uses DPDK multi-process feature to communic= ate. > > Master process captures packets from NIC and put them to a ring buffer, > > which is shared between master and slave process. > > The slave process looks up the shared ring buffer using rte_ring_lookup > > function and reads the packets. > > The slave process needs a memory pool, too. Therefore, it creates a > > mempool using rte_mempool_create. But If the slave process crashes duri= ng > > its processing and runs again, rte_mempool_create function fails and te= lls > > that there is a memory zone with that name. > > If I use rte_mempool_lookup in this case, the memory pool is not a clea= n > > memory pool. Because the previous run of slave process did not terminat= e > > gracefully and did not return all the objects to the pool. > > Is there any function to free an existing memory zone, which I call bef= ore > > rte_mempool_create to ensure that previous memory pool does not exists > > anymore? > > > > Best Regards, > > Mahdi. > >