DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mem: clarify documentation for rte_mem_virt2iova
Date: Thu, 14 Nov 2019 14:13:06 +0000	[thread overview]
Message-ID: <9ac0f4b480cec8cbe8a9910a68f9d564641c2f41.1573740779.git.anatoly.burakov@intel.com> (raw)

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@intel.com>
---
 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

             reply	other threads:[~2019-11-14 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 14:13 Anatoly Burakov [this message]
2019-11-18 13:14 ` Olivier Matz
2019-11-25 23:32   ` Thomas Monjalon
2019-11-26 12:54     ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ac0f4b480cec8cbe8a9910a68f9d564641c2f41.1573740779.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).