[dpdk-dev] [PATCH] mem: clarify documentation for rte_mem_virt2iova

Burakov, Anatoly anatoly.burakov at intel.com
Tue Nov 26 13:54:52 CET 2019


On 25-Nov-19 11:32 PM, Thomas Monjalon wrote:
> 18/11/2019 14:14, Olivier Matz:
>> On Thu, Nov 14, 2019 at 02:13:06PM +0000, Anatoly Burakov wrote:
>>> 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 <anatoly.burakov at intel.com>
>>
>> Reviewed-by: Olivier Matz <olivier.matz at 6wind.com>
> 
> Applied, thanks
> 

There are multiple places where this function is used, and its use is 
not compatible with external memory. I think we should replace all 
usages of this function to rte_mem_virt2memseg(), and rename this 
function, because its actual intended usage is *not* VA->IOVA 
translation, but instead is akin to figuring out what IOVA address 
*should* be with current IOVA settings, regardless of any internal page 
table and current VFIO mappings.

-- 
Thanks,
Anatoly


More information about the dev mailing list