[dpdk-dev] [PATCH v2 10/12] eal/pci: Finding a device bound to UIO does not force PA

Ben Walker benjamin.walker at intel.com
Thu May 30 23:29:57 CEST 2019


If a device is found that is bound to the UIO driver,
only force IOVA_PA if there is a driver registered to use it.

Signed-off-by: Ben Walker <benjamin.walker at intel.com>
---
 drivers/bus/pci/linux/pci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 5e61f46c8..a71c66380 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -627,7 +627,13 @@ rte_pci_get_iommu_class(void)
 		case RTE_KDRV_UIO_GENERIC:
 		case RTE_KDRV_NIC_UIO:
 			is_bound = true;
-			is_bound_uio = true;
+			FOREACH_DRIVER_ON_PCIBUS(drv) {
+				if (!rte_pci_match(drv, dev))
+					continue;
+
+				is_bound_uio = true;
+				break;
+			}
 			break;
 
 		}
-- 
2.20.1



More information about the dev mailing list