From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, santosh.shukla@caviumnetworks.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v3 4/4] vfio: do not needlessly check for IOVA mode
Date: Wed, 4 Apr 2018 15:40:47 +0100 [thread overview]
Message-ID: <f8668eac9ae024a1bb15cb7457c1f57b07ad292d.1522852799.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <277e34838d0f99ed0463ca2a1b8ce6b1dc9583b1.1522852799.git.anatoly.burakov@intel.com>
In-Reply-To: <f39a5aa831c176d8c450330dba4335d8061eb607.1522845566.git.anatoly.burakov@intel.com>
We already set IOVA addresses of memsegs and memzones to VA
address during initialization, so we don't need to check
whether we're in RTE_IOVA_VA mode anywhere else.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
Notes:
v3:
- Added missing ack by Santosh
v2:
- Added more detailed commit message
lib/librte_eal/linuxapp/eal/eal_vfio.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index e44ae4d..2421d51 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -681,10 +681,7 @@ vfio_type1_dma_map(int vfio_container_fd)
dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map);
dma_map.vaddr = ms[i].addr_64;
dma_map.size = ms[i].len;
- if (rte_eal_iova_mode() == RTE_IOVA_VA)
- dma_map.iova = dma_map.vaddr;
- else
- dma_map.iova = ms[i].iova;
+ dma_map.iova = ms[i].iova;
dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE;
ret = ioctl(vfio_container_fd, VFIO_IOMMU_MAP_DMA, &dma_map);
@@ -784,10 +781,7 @@ vfio_spapr_dma_map(int vfio_container_fd)
dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map);
dma_map.vaddr = ms[i].addr_64;
dma_map.size = ms[i].len;
- if (rte_eal_iova_mode() == RTE_IOVA_VA)
- dma_map.iova = dma_map.vaddr;
- else
- dma_map.iova = ms[i].iova;
+ dma_map.iova = ms[i].iova;
dma_map.flags = VFIO_DMA_MAP_FLAG_READ |
VFIO_DMA_MAP_FLAG_WRITE;
--
2.7.4
next prev parent reply other threads:[~2018-04-04 14:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-01 12:26 [dpdk-dev] [PATCH 1/4] test-crypto-perf: use virt2iova to get op IOVA address Anatoly Burakov
2018-04-01 12:26 ` [dpdk-dev] [PATCH 2/4] eal: do not use physical addresses in IOVA as VA mode Anatoly Burakov
2018-04-02 5:35 ` santosh
2018-04-02 10:02 ` Burakov, Anatoly
2018-04-02 13:02 ` santosh
2018-04-01 12:26 ` [dpdk-dev] [PATCH 3/4] fslmc: do not needlessly check for IOVA mode Anatoly Burakov
2018-04-02 7:47 ` Hemant Agrawal
2018-04-01 12:26 ` [dpdk-dev] [PATCH 4/4] vfio: " Anatoly Burakov
2018-04-02 16:29 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-04-02 17:12 ` Burakov, Anatoly
2018-04-02 19:55 ` Thomas Monjalon
2018-04-02 12:34 ` [dpdk-dev] [PATCH 1/4] test-crypto-perf: use virt2iova to get op IOVA address De Lara Guarch, Pablo
2018-04-04 12:39 ` [dpdk-dev] [PATCH v2 1/4] app/crypto-perf: " Anatoly Burakov
2018-04-04 14:40 ` [dpdk-dev] [PATCH v3 " Anatoly Burakov
2018-04-04 14:40 ` [dpdk-dev] [PATCH v3 2/4] eal: do not use physical addresses in IOVA as VA mode Anatoly Burakov
2018-04-04 14:40 ` [dpdk-dev] [PATCH v3 3/4] fslmc: do not needlessly check for IOVA mode Anatoly Burakov
2018-04-04 14:40 ` Anatoly Burakov [this message]
2018-04-11 0:19 ` [dpdk-dev] [dpdk-stable] [PATCH v3 4/4] vfio: " Thomas Monjalon
2018-04-04 12:39 ` [dpdk-dev] [PATCH v2 2/4] eal: do not use physical addresses in IOVA as VA mode Anatoly Burakov
2018-04-04 12:39 ` [dpdk-dev] [PATCH v2 3/4] fslmc: do not needlessly check for IOVA mode Anatoly Burakov
2018-04-04 12:39 ` [dpdk-dev] [PATCH v2 4/4] vfio: " Anatoly Burakov
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=f8668eac9ae024a1bb15cb7457c1f57b07ad292d.1522852799.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=santosh.shukla@caviumnetworks.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).