numam-dpdk/lib/librte_eal/common
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
..
include mem: get physical address of any pointer 2014-03-20 15:35:08 +01:00
eal_common_cpuflags.c eal: fix cpuflags for latest microarch 2014-02-25 21:29:18 +01:00
eal_common_errno.c add FreeBSD support 2014-02-25 21:29:18 +01:00
eal_common_hexdump.c update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
eal_common_launch.c update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
eal_common_log.c add FreeBSD support 2014-02-25 21:29:18 +01:00
eal_common_memory.c eal: fix printf format 2014-02-25 21:29:18 +01:00
eal_common_memzone.c mem: get memzone from any CPU socket when hugepages are disabled 2014-02-26 11:07:27 +01:00
eal_common_nonpci_devs.c xen: import xenvirt pmd and vhost_xen 2014-02-25 21:29:19 +01:00
eal_common_pci.c update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
eal_common_tailqs.c eal: fix printf format 2014-02-25 21:29:18 +01:00
eal_common_whitelist.c xen: import xenvirt pmd and vhost_xen 2014-02-25 21:29:19 +01:00
Makefile update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00