From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id D42381B252 for ; Mon, 6 Nov 2017 02:42:12 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1E82420C11; Sun, 5 Nov 2017 20:42:12 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 05 Nov 2017 20:42:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=lRh6Wiwhmwtbx4 6hdzOlLT3XkjX3ANYs8SyA7t7itp0=; b=Qmq3k1UaB6HiAubRHkwUh6Ofn40mA+ ouqr50BW0C95LfCC8eW5fbzqG2J3BVXLpCPN+QZg9syL9jM0346Vjpy+/h973xKG WPPN+4vc2pM8MurGgS8GAqKcB8QkL5GHRHyvKo/1g+E6p4drh73qnVPcbzj/7WU0 hkKa3bIcrjZm4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=lRh6Wiwhmwtbx46hdzOlLT3XkjX3ANYs8SyA7t7itp0=; b=jyNbiWMz pbU1OJ1szHtSzqAZc30AlkuO00zjvVrzCQ5EmGmDpqNqv740kzDdxr3CHkZM34Yr aranqb+oRnh6ifLOOuKXu8ySv95McUbmnvTa1/R22uRBkhEVQRyiVSM6VLnTXe0I iNiWaf0x2ICIJU9/eCyJDo6HpmN1YkYoScZGTKhKyGDJvwmO5gB7kNheB63PqBoe wOWIrP2gWgMKw1wydPStNL0efIamfdYEkwd9nzjfXqvSjMIZxuqKinKhUqfd3shy mEcQGrHzpV8qI+tQyvFHByAHuUMoABn/fFV0YplIdnkX1FSu0yQ9bCgwQZOXZfmb Wiri7aY6TQ9xpA== X-ME-Sender: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 409FA2469F; Sun, 5 Nov 2017 20:42:11 -0500 (EST) From: Thomas Monjalon To: Santosh Shukla Cc: olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com, dev@dpdk.org Date: Mon, 6 Nov 2017 02:41:28 +0100 Message-Id: <20171106014141.13266-3-thomas@monjalon.net> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171106014141.13266-1-thomas@monjalon.net> References: <20170814151537.29454-1-santosh.shukla@caviumnetworks.com> <20171106014141.13266-1-thomas@monjalon.net> Subject: [dpdk-dev] [PATCH v4 02/15] mem: introduce IOVA type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2017 01:42:13 -0000 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. + */ +typedef uint64_t rte_iova_t; +#define RTE_BAD_IOVA ((rte_iova_t)-1) /** * Physical memory segment descriptor. -- 2.14.2