From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 55783B0AE for ; Tue, 24 Jun 2014 19:41:04 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 24 Jun 2014 10:41:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,539,1400050800"; d="scan'208";a="560327334" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 24 Jun 2014 10:41:20 -0700 Received: from irsmsx153.ger.corp.intel.com (163.33.192.75) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 24 Jun 2014 18:41:20 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.31]) by IRSMSX153.ger.corp.intel.com ([169.254.9.233]) with mapi id 14.03.0123.003; Tue, 24 Jun 2014 18:41:19 +0100 From: "Richardson, Bruce" To: "Ananyev, Konstantin" , Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] mempool: don't leak ring on failure Thread-Index: AQHPj8QYxf+85oZiCUy1zZ/61g1cOpuAXuMAgAAoVTA= Date: Tue, 24 Jun 2014 17:41:19 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B02CEE3372@IRSMSX103.ger.corp.intel.com> References: <20140624084948.6d4ab3cd@nehalam.linuxnetplumber.net> <2601191342CEEE43887BDE71AB977258213340B1@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258213340B1@IRSMSX105.ger.corp.intel.com> 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] [PATCH] mempool: don't leak ring on failure 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: Tue, 24 Jun 2014 17:41:04 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin > Sent: Tuesday, June 24, 2014 9:16 AM > To: Stephen Hemminger; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] mempool: don't leak ring on failure >=20 > Hi Stephen, >=20 > > > > If mempool can not be created because of insufficient memory > > it returns an error but has already created a ring (and leaves it > > behind). This prevents code from trying one mempool size and then > > retrying with a smaller size if the bigger size fails. > > > > Reordering to do ring creation after getting memory fixes > > the problem. > > >=20 > But now, memzone created for the actual mempool could get leaked instead? >=20 Is either of these a problem that really needs to be fixed? If there is not= enough memory to create the mempool what is the app likely to do, other th= an just quit with an error message?