From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE140A04C6; Thu, 14 Nov 2019 15:13:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 20CE0A69; Thu, 14 Nov 2019 15:13:10 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 94042A69 for ; Thu, 14 Nov 2019 15:13:08 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2019 06:13:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,304,1569308400"; d="scan'208";a="406330362" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.151]) by fmsmga006.fm.intel.com with ESMTP; 14 Nov 2019 06:13:07 -0800 From: Anatoly Burakov To: dev@dpdk.org Date: Thu, 14 Nov 2019 14:13:06 +0000 Message-Id: <9ac0f4b480cec8cbe8a9910a68f9d564641c2f41.1573740779.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] mem: clarify documentation for rte_mem_virt2iova 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/librte_eal/common/include/rte_memory.h | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.17.1