[dpdk-dev] [RFC 21/23] eal: do not panic on failed PCI probe
Aaron Conole
aconole at redhat.com
Fri Dec 30 16:26:18 CET 2016
It may even be possible to simply log the error and continue on letting
the user check the logs and restart the application when things are failed.
Signed-off-by: Aaron Conole <aconole at redhat.com>
---
lib/librte_eal/linuxapp/eal/eal.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 68596e9..503e742 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -925,8 +925,11 @@ rte_eal_init(int argc, char **argv)
rte_eal_mp_wait_lcore();
/* Probe & Initialize PCI devices */
- if (rte_eal_pci_probe())
- rte_panic("Cannot probe PCI\n");
+ if (rte_eal_pci_probe()) {
+ RTE_LOG (ERR, EAL, "Cannot probe PCI\n");
+ errno = ENOTSUP;
+ return -1;
+ }
if (rte_eal_dev_init() < 0)
rte_panic("Cannot init pmd devices\n");
--
2.7.4
More information about the dev
mailing list