From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH] mempool: don't leak ring on failure Date: Wed, 25 Jun 2014 10:01:51 +0200 Message-ID: <53AA81EF.5010601@6wind.com> References: <20140624084948.6d4ab3cd@nehalam.linuxnetplumber.net> <53AA7E64.5060707@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Stephen Hemminger , "dev-VfR2kkLFssw@public.gmane.org" Return-path: In-Reply-To: <53AA7E64.5060707-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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.