[dpdk-dev] pci: do not log false failures for non-whitelisted devices

Message ID 1491317960-13577-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Headers

Checks

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

Commit Message

Andrew Rybchenko April 4, 2017, 2:59 p.m. UTC
  If probe of the whitelisted PCI device fails, reset ret to zero
to silently skip non-whitelisted PCI devices.

Fixes: 10f6c93cea38 ("eal: do not panic on PCI failures")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_eal/common/eal_common_pci.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Thomas Monjalon April 6, 2017, 9:15 p.m. UTC | #1
2017-04-04 15:59, Andrew Rybchenko:
> If probe of the whitelisted PCI device fails, reset ret to zero
> to silently skip non-whitelisted PCI devices.
> 
> Fixes: 10f6c93cea38 ("eal: do not panic on PCI failures")
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index a0fc980..1ab92c9 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -443,6 +443,7 @@  rte_eal_pci_probe(void)
 				 dev->addr.devid, dev->addr.function);
 			rte_errno = errno;
 			failed++;
+			ret = 0;
 		}
 	}