From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from www.6wind.com (www.6wind.com [92.243.28.209]) by dpdk.org (Postfix) with ESMTP id D694A256 for ; Tue, 16 Apr 2013 10:32:41 +0200 (CEST) Received: from proxy.6wind.com (33.106-14-84.ripe.coltfrance.com [84.14.106.33]) by www.6wind.com (Postfix) with ESMTP id 8E0822E175 for ; Tue, 16 Apr 2013 10:31:46 +0200 (CEST) Received: from 6wind.com (unknown [10.16.0.85]) by proxy.6wind.com (Postfix) with SMTP id 46C075986D for ; Tue, 16 Apr 2013 09:58:11 +0200 (CEST) Received: by 6wind.com (sSMTP sendmail emulation); Tue, 16 Apr 2013 10:31:48 +0200 From: Julien Courtat To: dev@dpdk.org Date: Tue, 16 Apr 2013 10:31:48 +0200 Message-Id: <1366101108-14177-1-git-send-email-julien.courtat@6wind.com> X-Mailer: git-send-email 1.7.2.5 Subject: [dpdk-dev] [PATCH] pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 08:32:41 -0000 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. Acked-by: Adrien Mazarguil Signed-off-by: Julien Courtat --- lib/librte_eal/common/eal_common_pci.c | 4 +++- 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 3a6ab70..4e1a944 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -91,9 +91,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; -- 1.7.2.5