mem: honor IOVA mode in virt2phy
Check iova mode and accordingly return phy addr. Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
parent
e85a919286
commit
680f6c1260
@ -139,6 +139,9 @@ rte_mem_virt2phy(const void *virtaddr)
|
||||
int page_size;
|
||||
off_t offset;
|
||||
|
||||
if (rte_eal_iova_mode() == RTE_IOVA_VA)
|
||||
return (uintptr_t)virtaddr;
|
||||
|
||||
/* when using dom0, /proc/self/pagemap always returns 0, check in
|
||||
* dpdk memory by browsing the memsegs */
|
||||
if (rte_xen_dom0_supported()) {
|
||||
|
Loading…
Reference in New Issue
Block a user