diff mbox series

[06/12] eal/pci: Correctly test whitelist/blacklist in rte_pci_get_iommu_class

Message ID 20190530174819.1160221-7-benjamin.walker@intel.com (mailing list archive)
State Superseded, archived
Headers show
Series [01/12] eal: Make rte_eal_using_phys_addrs work sooner | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Ben Walker May 30, 2019, 5:48 p.m. UTC
All of the checks should respect the white and black lists.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ie66176bea49987d1fc0a03dbee2638d9dd6efbc5
---
 drivers/bus/pci/linux/pci.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index f269b6a64..ebe62f140 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -597,8 +597,10 @@  rte_pci_get_iommu_class(void)
 	struct rte_pci_device *dev = NULL;
 	struct rte_pci_driver *drv = NULL;
 
-
 	FOREACH_DEVICE_ON_PCIBUS(dev) {
+		if (pci_ignore_device(dev))
+			continue;
+
 		if (dev->kdrv == RTE_KDRV_UNKNOWN ||
 		    dev->kdrv == RTE_KDRV_NONE) {
 			continue;
@@ -611,6 +613,9 @@  rte_pci_get_iommu_class(void)
 		return RTE_IOVA_DC;
 
 	FOREACH_DEVICE_ON_PCIBUS(dev) {
+		if (pci_ignore_device(dev))
+			continue;
+
 		if (dev->kdrv == RTE_KDRV_VFIO) {
 			FOREACH_DRIVER_ON_PCIBUS(drv) {
 				if (!rte_pci_match(drv, dev))