From 701d17f6d67a40c731e1939d33a17abad95223eb Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Thu, 18 Jun 2020 11:30:34 +0200 Subject: [PATCH] env_dpdk/pci: ignore rte_bus_scan() errors Extensive testing showed it can fail: > EAL: eal_parse_sysfs_value(): cannot open sysfs value > /sys/bus/pci/devices/0000:02:00.0/vendor > EAL: Scan for (pci) bus failed. spdk_pci_enumerate() would previously return with error because of this and e.g. the test nvme hotplug app could immediately exit with failure. A mis-timed scan shouldn't cause this kind of failure, so ignore it's return code. This shouldn't cause any issues. Change-Id: I9253219c218981a747774a8632335963cfb0db53 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2941 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Reviewed-by: Paul Luse Reviewed-by: Michael Haeuptle --- lib/env_dpdk/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index 3b204e1ff..fe5ceb306 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -473,10 +473,12 @@ spdk_pci_enumerate(struct spdk_pci_driver *driver, rte_pci_register(&driver->driver); } + rte_bus_scan(); + driver->cb_fn = enum_cb; driver->cb_arg = enum_ctx; - if (rte_bus_scan() != 0 || rte_bus_probe() != 0) { + if (rte_bus_probe() != 0) { driver->cb_arg = NULL; driver->cb_fn = NULL; return -1;