From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 602B2AFCF for ; Wed, 25 Jun 2014 10:01:41 +0200 (CEST) Received: by mail-wi0-f176.google.com with SMTP id n3so7320059wiv.3 for ; Wed, 25 Jun 2014 01:01:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Tp6Umo3EtQy8DpNdSqeaKAWBIprsU0tfbVZ3DVHAmJc=; b=Vq47fRE4+jVofHdw9YdI3fVT4jRyWI1boM7DHb1J6iVsjOTCjJVWcO3JhngfIfaVMN bpi6U6uI/GKe/jS2EM6k9py+pnlpR7BkQW04qWMlH9HBH04B/fpbtZalRf45n7Di4B0M /pUG2Twnrz0o+7P+3pOXTgZ634fuAlTj7QlfIFwudYFd6iMwsoXIm94HmnhlsvdodDup Ibyv145orTezaaNl0mqhDimUgih58hyPJslpAs5ERmE1LDu5DB+OhLKbJlHXxxcltLij ptDyZmynvFOThExFICVO3fnaEtvwZpCHusIyM8UZ69SZPKRUXAYLxcN7JhEmnIu5+McA yZbA== X-Gm-Message-State: ALoCoQmMaN71iQ15qy4PGU8JORrtKaB8t6R9b3S3WBiKdFBfoAhJ4TePeZAj12Qx+WqewLcyQllE X-Received: by 10.195.11.132 with SMTP id ei4mr7640166wjd.95.1403683319831; Wed, 25 Jun 2014 01:01:59 -0700 (PDT) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id jv9sm5807995wjc.28.2014.06.25.01.01.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Jun 2014 01:01:58 -0700 (PDT) Message-ID: <53AA81EF.5010601@6wind.com> Date: Wed, 25 Jun 2014 10:01:51 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: Stephen Hemminger , "dev@dpdk.org" References: <20140624084948.6d4ab3cd@nehalam.linuxnetplumber.net> <53AA7E64.5060707@6wind.com> In-Reply-To: <53AA7E64.5060707@6wind.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 25 Jun 2014 08:01:41 -0000 On 06/25/2014 09:46 AM, Olivier MATZ wrote: > Your patch moves the creation of the ring after the call to > rte_memzone_reserve(), so now it tries to create the memory > for the object pool before the ring. The problem disappears > because the object pool is usually much bigger than the ring, > so once the first allocation is done, the second is unlikely > to fail. > > I think this explanation could be added in the commit log. > > Acked-by: Olivier Matz Sorry, I didn't see that Konstantin and Bruce already answered to this.