[dpdk-dev] [PATCH] mempool: don't leak ring on failure

2014-06-25 Thread Olivier MATZ
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

[dpdk-dev] [PATCH] mempool: don't leak ring on failure

2014-06-25 Thread Olivier MATZ
Hello Stephen, On 06/24/2014 05:49 PM, Stephen Hemminger wrote: > 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 t

[dpdk-dev] [PATCH] mempool: don't leak ring on failure

2014-06-24 Thread Ananyev, Konstantin
> > On Tue, 24 Jun 2014 16:16:02 + > "Ananyev, Konstantin" wrote: > > > But now, memzone created for the actual mempool could get leaked instead? > > Since memzone's can't be destroyed, then only solution would be if > checked if memzone with same name already exists. Actually, wouldn't it

[dpdk-dev] [PATCH] mempool: don't leak ring on failure

2014-06-24 Thread Richardson, Bruce
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ananyev, Konstantin > Sent: Tuesday, June 24, 2014 9:16 AM > To: Stephen Hemminger; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] mempool: don't leak ring on failure > > Hi Step

[dpdk-dev] [PATCH] mempool: don't leak ring on failure

2014-06-24 Thread Ananyev, Konstantin
Hi Stephen, > > 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

[dpdk-dev] [PATCH] mempool: don't leak ring on failure

2014-06-24 Thread Stephen Hemminger
On Tue, 24 Jun 2014 16:16:02 + "Ananyev, Konstantin" wrote: > But now, memzone created for the actual mempool could get leaked instead? Since memzone's can't be destroyed, then only solution would be if checked if memzone with same name already exists.

[dpdk-dev] [PATCH] mempool: don't leak ring on failure

2014-06-24 Thread Stephen Hemminger
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 memo