git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af7551e
)
when allocating as much mem as possible (len=0), the size is not aligned
author
root
<root@ubuntu1604.vm.6wind.com>
Tue, 1 May 2018 19:10:22 +0000
(21:10 +0200)
committer
Olivier Matz
<olivier.matz@6wind.com>
Tue, 1 May 2018 19:20:20 +0000
(21:20 +0200)
lib/librte_mempool/rte_mempool.c
patch
|
blob
|
history
diff --git
a/lib/librte_mempool/rte_mempool.c
b/lib/librte_mempool/rte_mempool.c
index
cf5d124
..
bca9f9c
100644
(file)
--- a/
lib/librte_mempool/rte_mempool.c
+++ b/
lib/librte_mempool/rte_mempool.c
@@
-707,11
+707,15
@@
rte_mempool_populate_default(struct rte_mempool *mp)
iova, mz->len,
rte_mempool_memchunk_mz_free,
(void *)(uintptr_t)mz);
- else
- ret = rte_mempool_populate_virt(mp, mz->addr,
- mz->len, pg_sz,
+ else {
+ size_t tmp_len;
+
+ tmp_len = RTE_ALIGN_FLOOR(mz->len, pg_sz);
+ ret = rte_mempool_populate_virt(mp, mz->addr,
+ tmp_len, pg_sz,
rte_mempool_memchunk_mz_free,
(void *)(uintptr_t)mz);
+ }
if (ret < 0) {
rte_memzone_free(mz);
goto fail;