DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] mempool: Free memzone if mempool populate phys fails
  2016-11-11 14:42 [dpdk-dev] [PATCH] mempool: Free memzone if mempool populate phys fails Hemant Agrawal
@ 2016-11-11  9:33 ` Thomas Monjalon
  2016-11-11 15:47 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-11-11  9:33 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, olivier.matz, Nipun Gupta

2016-11-11 20:12, Hemant Agrawal:
> From: Nipun Gupta <nipun.gupta@nxp.com>
> 
> This fixes the issue of memzone not being freed, if 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.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>

You forgot the "Fixes:" line to give a tip on the release introducing this bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] mempool: Free memzone if mempool populate phys fails
  2016-11-11 15:47 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
@ 2016-11-11 14:35   ` Olivier Matz
  2016-11-12 21:07     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Matz @ 2016-11-11 14:35 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, Nipun Gupta

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH] mempool: Free memzone if mempool populate phys fails
@ 2016-11-11 14:42 Hemant Agrawal
  2016-11-11  9:33 ` Thomas Monjalon
  2016-11-11 15:47 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
  0 siblings, 2 replies; 5+ messages in thread
From: Hemant Agrawal @ 2016-11-11 14:42 UTC (permalink / raw)
  To: olivier.matz; +Cc: dev, Nipun Gupta

From: Nipun Gupta <nipun.gupta@nxp.com>

This fixes the issue of memzone not being freed, if 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.

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;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] mempool: Free memzone if mempool populate phys fails
  2016-11-11 14:42 [dpdk-dev] [PATCH] mempool: Free memzone if mempool populate phys fails Hemant Agrawal
  2016-11-11  9:33 ` Thomas Monjalon
@ 2016-11-11 15:47 ` Hemant Agrawal
  2016-11-11 14:35   ` Olivier Matz
  1 sibling, 1 reply; 5+ messages in thread
From: Hemant Agrawal @ 2016-11-11 15:47 UTC (permalink / raw)
  To: olivier.matz; +Cc: dev, Nipun Gupta

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;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] mempool: Free memzone if mempool populate phys fails
  2016-11-11 14:35   ` Olivier Matz
@ 2016-11-12 21:07     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-11-12 21:07 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: dev, Olivier Matz, Hemant Agrawal

> > 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>
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-12 21:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-11 14:42 [dpdk-dev] [PATCH] mempool: Free memzone if mempool populate phys fails 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
2016-11-12 21:07     ` Thomas Monjalon

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).