[dpdk-dev] [PATCH v4 02/15] mem: introduce IOVA type
santosh
santosh.shukla at caviumnetworks.com
Mon Nov 6 06:38:10 CET 2017
On Monday 06 November 2017 07:11 AM, Thomas Monjalon wrote:
> The IO virtual addresses may be used instead of physical addresses.
> As IOVA is more generic, it should be used in most places instead
> of physical address wording.
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> ---
> lib/librte_eal/common/include/rte_memory.h | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h
> index 5a3a956e3..f7eed9ab6 100644
> --- a/lib/librte_eal/common/include/rte_memory.h
> +++ b/lib/librte_eal/common/include/rte_memory.h
> @@ -92,8 +92,16 @@ enum rte_page_sizes {
> */
> #define __rte_cache_min_aligned __rte_aligned(RTE_CACHE_LINE_MIN_SIZE)
>
> -typedef uint64_t phys_addr_t; /**< Physical address definition. */
> +typedef uint64_t phys_addr_t; /**< Physical address. */
> #define RTE_BAD_PHYS_ADDR ((phys_addr_t)-1)
> +/**
> + * IO virtual address type.
> + * When the physical addressing mode is in use,
> + * the translation from a virtual address to a physical address
> + * is a direct mapping, i.e. the same value.
> + */
I guess - that description applicable for iova=va mode
and for iova=pa mode - Need to do explicit virt2phy translation.
I believe you mis-wrote - s/physical addressing mode/virtual addressing mode.
With that:
Acked-by: Santosh Shukla <santosh.shukla at caviumnetworks.com>
Thanks.
> +typedef uint64_t rte_iova_t;
> +#define RTE_BAD_IOVA ((rte_iova_t)-1)
>
> /**
> * Physical memory segment descriptor.
More information about the dev
mailing list