numam-dpdk/lib/librte_eal
Thomas Monjalon 3097de6e6b mem: get physical address of any pointer
Insert get_physaddr() into public API as rte_mem_virt2phy().

rte_mem_virt2phy() permits to obtain the physical address of any
virtual address mapped to the current process.
get_physaddr() was working only for addresses pointing exactly to
the first byte of a page.
Note that this function is very slow and shouldn't be called
after initialization to avoid a performance bottleneck.

The memory must be locked with mlock(). The function rte_mem_lock_page()
is a mlock() helper that lock the whole page.

A better name would be rte_mem_virt2phys but rte_mem_virt2phy is more
consistent with rte_mempool_virt2phy.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-03-20 15:35:08 +01:00
..
bsdapp add FreeBSD support 2014-02-25 21:29:18 +01:00
common mem: get physical address of any pointer 2014-03-20 15:35:08 +01:00
linuxapp mem: get physical address of any pointer 2014-03-20 15:35:08 +01:00
Makefile add FreeBSD support 2014-02-25 21:29:18 +01:00