DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: dev@dpdk.org, Nipun Gupta <nipun.gupta@nxp.com>
Subject: Re: [dpdk-dev] [PATCH v2] mempool: Free memzone if mempool populate phys fails
Date: Fri, 11 Nov 2016 15:35:42 +0100	[thread overview]
Message-ID: <b8df8799-6d53-1a33-f5eb-94ea9bf23f9c@6wind.com> (raw)
In-Reply-To: <1478879230-15729-1-git-send-email-hemant.agrawal@nxp.com>

Hi Hemant,

On 11/11/2016 04:47 PM, Hemant Agrawal wrote:
> From: Nipun Gupta <nipun.gupta@nxp.com>
> 
> This patch fixes the issue of memzone not being freed incase the
> rte_mempool_populate_phys fails in the rte_mempool_populate_default
> 
> This issue was identified when testing with OVS ~2.6
> - configure the system with low memory (e.g. < 500 MB)
> - add bridge and dpdk interfaces
> - delete brigde
> - keep on repeating the above sequence.
> 
> Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>  lib/librte_mempool/rte_mempool.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
> index e94e56f..aa513b9 100644
> --- a/lib/librte_mempool/rte_mempool.c
> +++ b/lib/librte_mempool/rte_mempool.c
> @@ -578,8 +578,10 @@ rte_mempool_populate_default(struct rte_mempool *mp)
>  				mz->len, pg_sz,
>  				rte_mempool_memchunk_mz_free,
>  				(void *)(uintptr_t)mz);
> -		if (ret < 0)
> +		if (ret < 0) {
> +			rte_memzone_free(mz);
>  			goto fail;
> +		}
>  	}
>  
>  	return mp->size;
> 

Acked-by: Olivier Matz <olivier.matz@6wind.com>


Thanks
Olivier

  reply	other threads:[~2016-11-11 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 14:42 [dpdk-dev] [PATCH] " Hemant Agrawal
2016-11-11  9:33 ` Thomas Monjalon
2016-11-11 15:47 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2016-11-11 14:35   ` Olivier Matz [this message]
2016-11-12 21:07     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8df8799-6d53-1a33-f5eb-94ea9bf23f9c@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=nipun.gupta@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).