xen: fix retrieval of physical address
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 11 Jul 2016 10:20:27 +0000 (12:20 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 11 Jul 2016 17:10:09 +0000 (19:10 +0200)
commite33c4d97913e06b46573a9a43beaf979f8444790
treed2f9d1730d1a80cc220ec21327f09e6d5c6ffa6d
parent9d59b409ca0963451cd7117df1ca1a19a9407e95
xen: fix retrieval of physical address

When using Xen Dom0, it looks that /proc/self/pagemap returns 0.
This breaks the creation of mbufs pool.

We can workaround this in rte_mem_virt2phy() by browsing the dpdk memory
segments. This only works for dpdk memory, but it's enough to fix the
mempool creation.

Fixes: c042ba20674a ("mempool: rework support of Xen dom0")
Fixes: 3097de6e6bfb ("mem: get physical address of any pointer")

Reported-by: Huilong Xu <huilongx.xu@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_eal/linuxapp/eal/eal_memory.c