[dpdk-dev,4/4] vfio: do not needlessly check for IOVA mode
Checks
Commit Message
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_vfio.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
Comments
01/04/2018 14:26, Anatoly Burakov:
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
It deserves an explanation.
Please Anatoly, think about commit explanations more often.
On 02-Apr-18 5:29 PM, Thomas Monjalon wrote:
> 01/04/2018 14:26, Anatoly Burakov:
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>
> It deserves an explanation.
>
> Please Anatoly, think about commit explanations more often.
>
I was under the impression that from context of previous patches, it
would be obvious?
But OK, i'll respin.
02/04/2018 19:12, Burakov, Anatoly:
> On 02-Apr-18 5:29 PM, Thomas Monjalon wrote:
> > 01/04/2018 14:26, Anatoly Burakov:
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> >
> > It deserves an explanation.
> >
> > Please Anatoly, think about commit explanations more often.
> >
>
> I was under the impression that from context of previous patches, it
> would be obvious?
When we'll check this file in the git history, the context
of previous patch won't be so useful.
> But OK, i'll respin.
Thanks, it's important to consider each patch individually.
@@ -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;