From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Aaron Conole <aconole@redhat.com>
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH v6 20/26] eal_pci: continue probing even on failures
Date: Wed, 08 Mar 2017 23:04:01 +0100 [thread overview]
Message-ID: <17738287.G52ncJujDH@xps13> (raw)
In-Reply-To: <20170228185315.12546-21-aconole@redhat.com>
2017-02-28 13:53, Aaron Conole:
> + int ret_1 = 0;
You do not need to add a new variable.
> int ret = 0;
>
> if (rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI) == 0)
> @@ -430,17 +432,20 @@ rte_eal_pci_probe(void)
>
> /* probe all or only whitelisted devices */
> if (probe_all)
> - ret = pci_probe_all_drivers(dev);
> + ret_1 = pci_probe_all_drivers(dev);
> else if (devargs != NULL &&
> devargs->type == RTE_DEVTYPE_WHITELISTED_PCI)
> - ret = pci_probe_all_drivers(dev);
> - if (ret < 0)
> - rte_exit(EXIT_FAILURE, "Requested device " PCI_PRI_FMT
> + ret_1 = pci_probe_all_drivers(dev);
> + if (ret_1 < 0) {
> + RTE_LOG(ERR, EAL, "Requested device " PCI_PRI_FMT
> " cannot be used\n", dev->addr.domain, dev->addr.bus,
> dev->addr.devid, dev->addr.function);
> + rte_errno = errno;
> + ret = 1;
> + }
> }
>
> - return 0;
> + return -ret;
It may be more explicit to use only one variable ret and filter
the positive values:
ret < 0 ? -1 : 0
next prev parent reply other threads:[~2017-03-08 22:04 UTC|newest]
Thread overview: 159+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 18:51 [dpdk-dev] [PATCH v2 00/25] linux/eal: Remove most causes of panic on init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 01/25] eal: CPU init will no longer panic Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 02/25] eal: return error instead of panic for cpu init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 03/25] eal: No panic on hugepages info init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 04/25] eal: do not panic on failed hugepage query Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 05/25] eal: failure to parse args returns error Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 06/25] eal-common: introduce a way to query cpu support Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 07/25] eal: Signal error when CPU isn't supported Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 08/25] eal: do not panic on memzone initialization fails Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 09/25] eal: set errno when exiting for already called Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 10/25] eal: Do not panic on log failures Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 11/25] eal: Do not panic on pci-probe Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 12/25] eal: do not panic on vfio failure Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 13/25] eal: do not panic on memory init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 14/25] eal: do not panic on tailq init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 15/25] eal: do not panic on alarm init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 16/25] eal: convert timer_init not to call panic Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 17/25] eal: change the private pipe call to reflect errno Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 18/25] eal: Do not panic on interrupt thread init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 19/25] eal: do not error if plugins fail to init Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 20/25] eal_pci: Continue probing even on failures Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 21/25] eal: do not panic on failed PCI probe Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 22/25] eal_common_dev: continue initializing vdevs Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 23/25] eal: do not panic (or abort) if vdev init fails Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 24/25] eal: do not panic when bus probe fails Aaron Conole
2017-02-08 18:51 ` [dpdk-dev] [PATCH v2 25/25] rte_eal_init: add info about rte_errno codes Aaron Conole
2017-02-08 19:11 ` [dpdk-dev] [PATCH v2 00/25] linux/eal: Remove most causes of panic on init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 " Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 01/25] eal: CPU init will no longer panic Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 02/25] eal: return error instead of panic for cpu init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 03/25] eal: No panic on hugepages info init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 04/25] eal: do not panic on failed hugepage query Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 05/25] eal: failure to parse args returns error Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 06/25] eal-common: introduce a way to query cpu support Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 07/25] eal: Signal error when CPU isn't supported Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 08/25] eal: do not panic on memzone initialization fails Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 09/25] eal: set errno when exiting for already called Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 10/25] eal: Do not panic on log failures Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 11/25] eal: Do not panic on pci-probe Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 12/25] eal: do not panic on vfio failure Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 13/25] eal: do not panic on memory init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 14/25] eal: do not panic on tailq init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 15/25] eal: do not panic on alarm init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 16/25] eal: convert timer_init not to call panic Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 17/25] eal: change the private pipe call to reflect errno Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 18/25] eal: Do not panic on interrupt thread init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 19/25] eal: do not error if plugins fail to init Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 20/25] eal_pci: Continue probing even on failures Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 21/25] eal: do not panic on failed PCI probe Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 22/25] eal_common_dev: continue initializing vdevs Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 23/25] eal: do not panic (or abort) if vdev init fails Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 24/25] eal: do not panic when bus probe fails Aaron Conole
2017-02-09 14:29 ` [dpdk-dev] [PATCH v3 25/25] rte_eal_init: add info about rte_errno codes Aaron Conole
2017-02-09 22:37 ` Stephen Hemminger
2017-02-14 21:31 ` Aaron Conole
2017-02-09 22:38 ` [dpdk-dev] [PATCH v3 00/25] linux/eal: Remove most causes of panic on init Stephen Hemminger
2017-02-14 20:50 ` Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 00/26] " Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 01/26] eal: CPU init will no longer panic Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 02/26] eal: return error instead of panic for cpu init Aaron Conole
2017-02-27 12:58 ` Bruce Richardson
2017-02-27 14:35 ` Aaron Conole
2017-02-27 13:00 ` Bruce Richardson
2017-02-27 14:34 ` Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 03/26] eal: No panic on hugepages info init Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 04/26] eal: do not panic on failed hugepage query Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 05/26] eal: failure to parse args returns error Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 06/26] eal-common: introduce a way to query cpu support Aaron Conole
2017-02-27 13:48 ` Bruce Richardson
2017-02-27 14:33 ` Aaron Conole
2017-02-27 15:11 ` Bruce Richardson
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 07/26] eal: Signal error when CPU isn't supported Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 08/26] eal: do not panic on memzone initialization fails Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 09/26] eal: set errno when exiting for already called Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 10/26] eal: Do not panic on log failures Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 11/26] eal: Do not panic on pci-probe Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 12/26] eal: do not panic on vfio failure Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 13/26] eal: do not panic on memory init Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 14/26] eal: do not panic on tailq init Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 15/26] eal: do not panic on alarm init Aaron Conole
2017-02-25 16:02 ` [dpdk-dev] [PATCH v4 16/26] eal: convert timer_init not to call panic Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 17/26] eal: change the private pipe call to reflect errno Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 18/26] eal: Do not panic on interrupt thread init Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 19/26] eal: do not error if plugins fail to init Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 20/26] eal_pci: Continue probing even on failures Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 21/26] eal: do not panic on failed PCI probe Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 22/26] eal_common_dev: continue initializing vdevs Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 23/26] eal: do not panic (or abort) if vdev init fails Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 24/26] eal: do not panic when bus probe fails Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 25/26] eal: do not panic on failed bus scan Aaron Conole
2017-02-25 16:03 ` [dpdk-dev] [PATCH v4 26/26] rte_eal_init: add info about rte_errno codes Aaron Conole
2017-02-27 13:59 ` [dpdk-dev] [PATCH v4 00/26] linux/eal: Remove most causes of panic on init Bruce Richardson
2017-02-27 14:34 ` Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 " Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 01/26] eal: CPU init will no longer panic Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 02/26] eal: return error instead of panic for cpu init Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 03/26] eal: No panic on hugepages info init Aaron Conole
2017-02-28 14:25 ` Bruce Richardson
2017-02-28 14:48 ` Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 04/26] eal: do not panic on failed hugepage query Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 05/26] eal: failure to parse args returns error Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 06/26] eal-common: introduce a way to query cpu support Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 07/26] eal: Signal error when CPU isn't supported Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 08/26] eal: do not panic on memzone initialization fails Aaron Conole
2017-02-28 14:27 ` Bruce Richardson
2017-02-28 14:46 ` Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 09/26] eal: set errno when exiting for already called Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 10/26] eal: Do not panic on log failures Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 11/26] eal: Do not panic on pci-probe Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 12/26] eal: do not panic on vfio failure Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 13/26] eal: do not panic on memory init Aaron Conole
2017-02-27 16:17 ` [dpdk-dev] [PATCH v5 14/26] eal: do not panic on tailq init Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 15/26] eal: do not panic on alarm init Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 16/26] eal: convert timer_init not to call panic Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 17/26] eal: change the private pipe call to reflect errno Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 18/26] eal: Do not panic on interrupt thread init Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 19/26] eal: do not error if plugins fail to init Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 20/26] eal_pci: Continue probing even on failures Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 21/26] eal: do not panic on failed PCI probe Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 22/26] eal_common_dev: continue initializing vdevs Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 23/26] eal: do not panic (or abort) if vdev init fails Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 24/26] eal: do not panic when bus probe fails Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 25/26] eal: do not panic on failed bus scan Aaron Conole
2017-02-27 16:18 ` [dpdk-dev] [PATCH v5 26/26] rte_eal_init: add info about rte_errno codes Aaron Conole
2017-02-28 14:45 ` [dpdk-dev] [PATCH v5 00/26] linux/eal: Remove most causes of panic on init Bruce Richardson
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 " Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 01/26] eal: cpu init will no longer panic Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 02/26] eal: return error instead of panic for cpu init Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 03/26] eal: do not panic on hugepage info init Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 04/26] eal: do not panic on failed hugepage query Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 05/26] eal: do not panic if parsing args returns error Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 06/26] eal-common: introduce a way to query cpu support Aaron Conole
2017-03-08 21:45 ` Thomas Monjalon
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 07/26] eal: do not panic when CPU isn't supported Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 08/26] eal: do not panic on memzone initialization fails Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 09/26] eal: set errno when exiting for already called Aaron Conole
2017-02-28 18:52 ` [dpdk-dev] [PATCH v6 10/26] eal: do not panic on log failures Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 11/26] eal: do not panic on PCI-probe Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 12/26] eal: do not panic on vfio failure Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 13/26] eal: do not panic on memory init Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 14/26] eal: do not panic on tailq init Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 15/26] eal: do not panic on alarm init Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 16/26] eal: convert timer init not to call panic Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 17/26] eal: change the private pipe call to reflect errno Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 18/26] eal: do not panic on interrupt thread init Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 19/26] eal: do not error if plugins fail to init Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 20/26] eal_pci: continue probing even on failures Aaron Conole
2017-03-08 22:04 ` Thomas Monjalon [this message]
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 21/26] eal: do not panic on failed PCI-probe Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 22/26] eal_common_dev: continue initializing vdevs Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 23/26] eal: do not panic (or abort) if vdev init fails Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 24/26] eal: do not panic when bus probe fails Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 25/26] eal: do not panic on failed bus scan Aaron Conole
2017-02-28 18:53 ` [dpdk-dev] [PATCH v6 26/26] rte_eal_init: add info about various error codes Aaron Conole
2017-03-08 21:58 ` [dpdk-dev] [PATCH v6 00/26] linux/eal: Remove most causes of panic on init Thomas Monjalon
2017-03-09 9:11 ` Bruce Richardson
2017-03-09 9:26 ` Thomas Monjalon
2017-03-09 9:38 ` Richardson, Bruce
2017-03-10 18:34 ` Aaron Conole
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17738287.G52ncJujDH@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=aconole@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).