patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2] mempool: fix search of maximum contiguous pages
       [not found] <1476351445-18102-1-git-send-email-wei.dai@intel.com>
@ 2016-10-25 15:01 ` Olivier Matz
  2016-10-25 21:23   ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Olivier Matz @ 2016-10-25 15:01 UTC (permalink / raw)
  To: dev, wei.dai
  Cc: sergio.gonzalez.monroy, jianfeng.tan, thomas.monjalon, stable

From: Wei Dai <wei.dai@intel.com>

paddr[i] + pg_sz always points to the start physical address of the
2nd page after pddr[i], so only up to 2 pages can be combinded to
be used. With this revision, more than 2 pages can be used.

Fixes: 84121f197187 ("mempool: store memory chunks in a list")

Signed-off-by: Wei Dai <wei.dai@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mempool/rte_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 71017e1..e94e56f 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -428,7 +428,7 @@ rte_mempool_populate_phys_tab(struct rte_mempool *mp, char *vaddr,
 
 		/* populate with the largest group of contiguous pages */
 		for (n = 1; (i + n) < pg_num &&
-			     paddr[i] + pg_sz == paddr[i+n]; n++)
+			     paddr[i + n - 1] + pg_sz == paddr[i + n]; n++)
 			;
 
 		ret = rte_mempool_populate_phys(mp, vaddr + i * pg_sz,
-- 
2.8.1

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

* Re: [dpdk-stable] [PATCH v2] mempool: fix search of maximum contiguous pages
  2016-10-25 15:01 ` [dpdk-stable] [PATCH v2] mempool: fix search of maximum contiguous pages Olivier Matz
@ 2016-10-25 21:23   ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-10-25 21:23 UTC (permalink / raw)
  To: Olivier Matz, wei.dai; +Cc: dev, sergio.gonzalez.monroy, jianfeng.tan, stable

2016-10-25 17:01, Olivier Matz:
> From: Wei Dai <wei.dai@intel.com>
> 
> paddr[i] + pg_sz always points to the start physical address of the
> 2nd page after pddr[i], so only up to 2 pages can be combinded to
> be used. With this revision, more than 2 pages can be used.
> 
> Fixes: 84121f197187 ("mempool: store memory chunks in a list")
> 
> Signed-off-by: Wei Dai <wei.dai@intel.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks

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

end of thread, other threads:[~2016-10-25 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1476351445-18102-1-git-send-email-wei.dai@intel.com>
2016-10-25 15:01 ` [dpdk-stable] [PATCH v2] mempool: fix search of maximum contiguous pages Olivier Matz
2016-10-25 21:23   ` 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).