summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Courtat <julien.courtat@6wind.com>2013-04-16 10:31:48 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-07-25 16:08:01 +0200
commit74a5f4b0ced2fa2739fec4ac2a2cc1eab80a6ee4 (patch)
treeac665d9883328e22320445943dc7eb76793051fd
parent7c6afd907242df13d01ff41ec6ec509c35b9c3f7 (diff)
downloaddpdk-74a5f4b0ced2fa2739fec4ac2a2cc1eab80a6ee4.zip
dpdk-74a5f4b0ced2fa2739fec4ac2a2cc1eab80a6ee4.tar.gz
dpdk-74a5f4b0ced2fa2739fec4ac2a2cc1eab80a6ee4.tar.xz
pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag
When blacklisting network adapters that share a PCI bus address with multiple ports such as Mellanox ConnectX-3 (librte_pmd_mlx4), RTE applications enter infinite loops while probing PCI devices. This commit removes this probe on subsequent instances for blacklisted devices that have RTE_PCI_DRV_MULTIPLE set. Signed-off-by: Julien Courtat <julien.courtat@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
-rw-r--r--lib/librte_eal/common/eal_common_pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 83aeecb..24e6627 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -121,9 +121,11 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
if (rte_eal_pci_probe_one_driver(dr, dev))
continue;
/* initialize subsequent driver instances for this device */
- if (dr->drv_flags & RTE_PCI_DRV_MULTIPLE)
+ if ((dr->drv_flags & RTE_PCI_DRV_MULTIPLE) &&
+ (!dev->blacklisted)) {
while (rte_eal_pci_probe_one_driver(dr, dev) == 0)
;
+ }
return 0;
}
return -1;