From: Anatoly Burakov Date: Thu, 14 Nov 2019 14:13:06 +0000 (+0000) Subject: mem: clarify documentation of virt2iova behaviour X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bdc993fa3dc38d6ae2d4d1480604556bc20a5522;p=dpdk.git mem: clarify documentation of virt2iova behaviour It may not be immediately clear that rte_mem_virt2iova does not actually check the internal memseg table, and will instead either return VA (in IOVA as VA mode), or will fall back to kernel page table walk (in IOVA as PA mode). Add a note to API documentation indicating the above. Signed-off-by: Anatoly Burakov Reviewed-by: Olivier Matz --- diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h index bf81a2faa8..3d8d0bd697 100644 --- a/lib/librte_eal/common/include/rte_memory.h +++ b/lib/librte_eal/common/include/rte_memory.h @@ -110,6 +110,11 @@ phys_addr_t rte_mem_virt2phy(const void *virt); /** * Get IO virtual address of any mapped virtual address in the current process. * + * @note This function will not check internal page table. Instead, in IOVA as + * PA mode, it will fall back to getting real physical address (which may + * not match the expected IOVA, such as what was specified for external + * memory). + * * @param virt * The virtual address. * @return