On Fri, Jun 09, 2017 at 10:29:37AM +0200, Olivier Matz wrote:
> 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 cdc242f260e7 ("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: cdc242f260e7 ("eal/linux: support running as unprivileged user")
> 
> CC: sta...@dpdk.org
> Signed-off-by: Olivier Matz <olivier.m...@6wind.com>

Tested-by: Adrien Mazarguil <adrien.mazarg...@6wind.com>

-- 
Adrien Mazarguil
6WIND

Reply via email to