From: Aaron Conole <aconole@redhat.com>
To: Nitin Katiyar <nitin.katiyar@ericsson.com>
Cc: <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] eal: DPDK init doesn't fail even if device probe fails.
Date: Tue, 27 Aug 2019 09:57:01 -0400 [thread overview]
Message-ID: <f7t1rx6btjm.fsf@dhcp-25.97.bos.redhat.com> (raw)
In-Reply-To: <1566934217-23824-2-git-send-email-nitin.katiyar@ericsson.com> (Nitin Katiyar's message of "Wed, 28 Aug 2019 01:00:17 +0530")
Nitin Katiyar <nitin.katiyar@ericsson.com> writes:
> rte_bus_probe() doesn't return error. As a result rte_eal_init()
> doesn't catch this error and thus making dpdk initialization
> successful despite probe failing for devices.
>
> This patch returns error if probe fails for any of device.
>
> Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com>
> ---
> lib/librte_eal/common/eal_common_bus.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
> index baa5b53..1721179 100644
> --- a/lib/librte_eal/common/eal_common_bus.c
> +++ b/lib/librte_eal/common/eal_common_bus.c
> @@ -70,16 +70,20 @@
> }
>
> ret = bus->probe();
> - if (ret)
> + if (ret) {
> RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
> bus->name);
> + return ret;
> + }
If we return an error here, won't this fail to probe vbus? In fact,
this will disrupt all subsequent bus probes, yes?
Why should a single bus problem be a 'cannot init' level failure?
> }
>
> if (vbus) {
> ret = vbus->probe();
> - if (ret)
> + if (ret) {
> RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
> vbus->name);
> + return ret;
> + }
> }
>
> return 0;
next prev parent reply other threads:[~2019-08-27 13:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 19:30 [dpdk-dev] [PATCH 1/2] bus/pci: Fail rte_pci_probe if probing all whitelisted devices fail Nitin Katiyar
2019-08-27 19:30 ` [dpdk-dev] [PATCH 2/2] eal: DPDK init doesn't fail even if device probe fails Nitin Katiyar
2019-08-27 13:57 ` Aaron Conole [this message]
2019-08-27 20:12 ` [dpdk-dev] [PATCH 1/2] bus/pci: Fail rte_pci_probe if probing all whitelisted devices fail Stephen Hemminger
2019-08-29 3:47 ` Nitin Katiyar
2019-08-29 15:33 ` Stephen Hemminger
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=f7t1rx6btjm.fsf@dhcp-25.97.bos.redhat.com \
--to=aconole@redhat.com \
--cc=dev@dpdk.org \
--cc=nitin.katiyar@ericsson.com \
/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).