From: Bruce Richardson <bruce.richardson@intel.com>
To: Aaron Conole <aconole@redhat.com>
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] [PATCH v4 06/26] eal-common: introduce a way to query cpu support
Date: Mon, 27 Feb 2017 15:11:27 +0000 [thread overview]
Message-ID: <20170227151127.GA130696@bricha3-MOBL3.ger.corp.intel.com> (raw)
In-Reply-To: <f7th93fvh3k.fsf@redhat.com>
On Mon, Feb 27, 2017 at 09:33:19AM -0500, Aaron Conole wrote:
> Bruce Richardson <bruce.richardson@intel.com> writes:
>
> > On Sat, Feb 25, 2017 at 11:02:49AM -0500, Aaron Conole wrote:
> >> This adds a new API to check for the eal cpu versions.
> >>
> >> Signed-off-by: Aaron Conole <aconole@redhat.com>
> >> ---
> >> lib/librte_eal/common/eal_common_cpuflags.c | 13 +++++++++++--
> >> lib/librte_eal/common/include/generic/rte_cpuflags.h | 9 +++++++++
> >> 2 files changed, 20 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/lib/librte_eal/common/eal_common_cpuflags.c b/lib/librte_eal/common/eal_common_cpuflags.c
> >> index b5f76f7..2c2127b 100644
> >> --- a/lib/librte_eal/common/eal_common_cpuflags.c
> >> +++ b/lib/librte_eal/common/eal_common_cpuflags.c
> >> @@ -43,6 +43,13 @@
> >> void
> >> rte_cpu_check_supported(void)
> >> {
> >> + if (!rte_cpu_is_supported())
> >> + exit(1);
> >> +}
> >> +
> >> +bool
> >> +rte_cpu_is_supported(void)
> >> +{
> >> /* This is generated at compile-time by the build system */
> >> static const enum rte_cpu_flag_t compile_time_flags[] = {
> >> RTE_COMPILE_TIME_CPUFLAGS
> >> @@ -57,14 +64,16 @@ rte_cpu_check_supported(void)
> >> fprintf(stderr,
> >> "ERROR: CPU feature flag lookup failed with error %d\n",
> >> ret);
> >> - exit(1);
> >> + return false;
> >> }
> >> if (!ret) {
> >> fprintf(stderr,
> >> "ERROR: This system does not support \"%s\".\n"
> >> "Please check that RTE_MACHINE is set correctly.\n",
> >> rte_cpu_get_flag_name(compile_time_flags[i]));
> >> - exit(1);
> >> + return false;
> >> }
> >> }
> >> +
> >> + return true;
> >> }
> >> diff --git a/lib/librte_eal/common/include/generic/rte_cpuflags.h b/lib/librte_eal/common/include/generic/rte_cpuflags.h
> >> index 71321f3..e4342ad 100644
> >> --- a/lib/librte_eal/common/include/generic/rte_cpuflags.h
> >> +++ b/lib/librte_eal/common/include/generic/rte_cpuflags.h
> >> @@ -40,6 +40,7 @@
> >> */
> >>
> >> #include <errno.h>
> >> +#include <stdbool.h>
> >>
> >
> > The addition of this include is causing all sorts of compilation errors
> > inside the PMDs, as many of them seem to be defining their own bools
> > types. :-(
> >
> > For safety sake, probably best to have the function return int rather
> > than bool.
>
> Will do - I never saw the issue, but perhaps I was excluding the PMDs
> in question.
>
> Thanks for the review, Bruce!
No problem.
FYI, the drivers I saw the errors in with this patch are:
* qede
* i40e
* ixgbe
* cxgbe
Regards,
/Bruce
next prev parent reply other threads:[~2017-02-27 15:11 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 [this message]
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
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=20170227151127.GA130696@bricha3-MOBL3.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=aconole@redhat.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).