Go to file
Olivier Matz 5751ff40fe mempool: fix alignment of memzone length when populating
When populating a mempool with the default function, if there is not
enough virtually contiguous memory for the whole mempool, it will be
populated with several chunks. A chunk of the maximum available length
is requested with:

  mz = rte_memzone_reserve_aligned(..., len=0, ..., align=x)

If align is smaller than the page size, the address and the length of
the memzone may not be a multiple of the page size. This makes
rte_mempool_populate_virt() to fail because it requires them to be
page-aligned. This patch fixes that.

The problem can be reproduced easily by allocating more than available
memory:
  ./build/app/testpmd -l 0,1 -- --total-num-mbufs=65536
  ...
  Cause: Creation of mbuf pool for socket 0 failed: Invalid argument

After the patch, the error code is correct:
  ./build/app/testpmd -l 0,1 -- --total-num-mbufs=65536
  ...
  Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory

Fixes: ba0009560c ("mempool: support new allocation methods")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-05-08 15:58:20 +02:00
app app/testpmd: conserve offload flags of mbuf 2018-04-27 20:11:33 +02:00
buildtools buildtools: output build failure reason to stderr 2018-02-08 22:25:37 +01:00
config raw/dpaa2_cmdif: introduce DPAA2 command interface driver 2018-05-08 14:20:39 +02:00
devtools crypto/ccp: add AMD ccp skeleton PMD 2018-04-23 18:19:43 +01:00
doc doc: add DPAA2 CMDIF rawdev guide 2018-05-08 14:21:18 +02:00
drivers raw/dpaa2_cmdif: support enqueue/dequeue operations 2018-05-08 14:21:07 +02:00
examples examples/flow_classify: fix validation in port init 2018-04-30 15:48:26 +02:00
kernel igb_uio: pass MODULE_CFLAGS in Kbuild 2018-05-01 16:46:22 +02:00
lib mempool: fix alignment of memzone length when populating 2018-05-08 15:58:20 +02:00
license license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
mk raw/dpaa2_cmdif: introduce DPAA2 command interface driver 2018-05-08 14:20:39 +02:00
pkg version: 18.02.0 2018-02-14 19:11:02 +01:00
test test/mempool: fix autotest retry 2018-04-26 18:16:12 +02:00
usertools usertools: add Cavium TIM as an event device 2018-04-16 11:11:06 +02:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore devtools: add tags and cscope index generation 2017-04-30 12:57:04 +02:00
GNUmakefile move kernel modules directories 2018-03-21 23:04:21 +01:00
MAINTAINERS doc: add DPAA2 CMDIF rawdev guide 2018-05-08 14:21:18 +02:00
Makefile license: use SPDX tag in root makefile 2018-01-04 22:41:38 +01:00
meson_options.txt net/mvpp2: add to meson build 2018-04-19 14:10:44 +02:00
meson.build version: 18.05-rc2 2018-05-02 23:12:16 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org