summaryrefslogtreecommitdiff
path: root/drivers/bus/pci/linux/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bus/pci/linux/pci.c')
-rw-r--r--drivers/bus/pci/linux/pci.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index b12f10a..1a2f99b 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -578,12 +578,10 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv,
else
is_vfio_noiommu_enabled = 0;
}
- if ((pdrv->drv_flags & RTE_PCI_DRV_IOVA_AS_VA) == 0) {
+ if (is_vfio_noiommu_enabled != 0)
iova_mode = RTE_IOVA_PA;
- } else if (is_vfio_noiommu_enabled != 0) {
- RTE_LOG(DEBUG, EAL, "Forcing to 'PA', vfio-noiommu mode configured\n");
- iova_mode = RTE_IOVA_PA;
- }
+ else if ((pdrv->drv_flags & RTE_PCI_DRV_IOVA_AS_VA) != 0)
+ iova_mode = RTE_IOVA_VA;
#endif
break;
}
@@ -594,8 +592,8 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv,
break;
default:
- RTE_LOG(DEBUG, EAL, "Unsupported kernel driver? Defaulting to IOVA as 'PA'\n");
- iova_mode = RTE_IOVA_PA;
+ if ((pdrv->drv_flags & RTE_PCI_DRV_IOVA_AS_VA) != 0)
+ iova_mode = RTE_IOVA_VA;
break;
}
@@ -607,10 +605,8 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv,
if (iommu_no_va == -1)
iommu_no_va = pci_one_device_iommu_support_va(pdev)
? 0 : 1;
- if (iommu_no_va != 0) {
- RTE_LOG(DEBUG, EAL, "Forcing to 'PA', IOMMU does not support IOVA as 'VA'\n");
+ if (iommu_no_va != 0)
iova_mode = RTE_IOVA_PA;
- }
}
return iova_mode;
}