numam-dpdk/lib/librte_mempool
Olivier Matz ad10c17821 mem: do not advertise physical address when no hugepages
When populating a mempool with a virtual memory area, the mempool
library expects to be able to get the physical address of each page.

When started with --no-huge, the physical addresses may not be available
because the pages are not locked in memory. It sometimes returns
RTE_BAD_PHYS_ADDR, which makes the mempool_populate() function to fail.

This was working before the commit cdc242f260 ("eal/linux: support
running as unprivileged user"), because rte_mem_virt2phy() was returning
0 instead of RTE_BAD_PHYS_ADDR, which was seen as a valid physical
address.

Since --no-huge is a debug function that breaks the support of physical
drivers, always set physical addresses to RTE_BAD_PHYS_ADDR in memzones
or in rte_mem_virt2phy(), and ensure that mempool won't complain in that
case.

Fixes: cdc242f260 ("eal/linux: support running as unprivileged user")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Jan Blunck <jblunck@infradead.org>
2017-07-04 17:51:22 +02:00
..
Makefile mempool: move stack handler as a driver 2017-04-03 19:45:45 +02:00
rte_mempool_ops.c mempool: fix missing registration of free function 2016-07-21 23:15:47 +02:00
rte_mempool_version.map mempool: remove deprecated count functions 2017-02-21 12:05:46 +01:00
rte_mempool.c mem: do not advertise physical address when no hugepages 2017-07-04 17:51:22 +02:00
rte_mempool.h eal: introduce macro for always inline 2017-06-06 17:21:55 +02:00