From mboxrd@z Thu Jan 1 00:00:00 1970 From: santosh Subject: Re: [PATCH v4 02/15] mem: introduce IOVA type Date: Mon, 6 Nov 2017 11:08:10 +0530 Message-ID: <80cb9e8f-c493-4b5f-909f-9ae233ba6541@caviumnetworks.com> References: <20170814151537.29454-1-santosh.shukla@caviumnetworks.com> <20171106014141.13266-1-thomas@monjalon.net> <20171106014141.13266-3-thomas@monjalon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com, dev@dpdk.org To: Thomas Monjalon Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0068.outbound.protection.outlook.com [104.47.32.68]) by dpdk.org (Postfix) with ESMTP id 209351B24B for ; Mon, 6 Nov 2017 06:38:31 +0100 (CET) In-Reply-To: <20171106014141.13266-3-thomas@monjalon.net> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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 Thanks. > +typedef uint64_t rte_iova_t; > +#define RTE_BAD_IOVA ((rte_iova_t)-1) > > /** > * Physical memory segment descriptor.