From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] failsafe: skip devargs if not present in secondary
Date: Mon, 24 Jun 2019 10:15:58 +0200 [thread overview]
Message-ID: <20190624081558.bsu3j2inahwumlzj@bidouze.vm.6wind.com> (raw)
In-Reply-To: <20190621220824.18073-1-stephen@networkplumber.org>
Hello Stephen,
On Fri, Jun 21, 2019 at 03:08:24PM -0700, Stephen Hemminger wrote:
> When secondary process is run was noticing that the log always
> contained complaints about unable to parse devargs.
>
> It turns out that an empty devargs turns into "" and this
> value is not parsable. Change the failsafe secondary to just
> skip doing devargs if it empty.
>
Commit log needs a little rework, a few typos.
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/net/failsafe/failsafe.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
> index e91c274d8059..04ca0cab0d78 100644
> --- a/drivers/net/failsafe/failsafe.c
> +++ b/drivers/net/failsafe/failsafe.c
> @@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
> * A sub-device can be plugged later.
> */
> FOREACH_SUBDEV(sdev, i, eth_dev) {
> + /* skip empty devargs */
> + if (sdev->devargs.name[0] == '\0')
> + continue;
> +
An empty devargs being named "" is part of the internals of rte_devargs.
The clean solution would be to add a `bool rte_devargs_empty()` function
and test the devargs with it.
The simple solution is your proposition.
Clean seems a little heavy-handed, but it would be more stable. If you
agree, you can add the helper. I'm ok with keeping it simple otherwise.
> /* rebuild devargs to be able to get the bus name. */
> ret = rte_devargs_parse(&devargs,
> sdev->devargs.name);
> --
> 2.20.1
>
--
Gaëtan Rivet
6WIND
next prev parent reply other threads:[~2019-06-24 8:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 22:08 [dpdk-dev] [PATCH] failsafe: skip devargs if not present in secondary Stephen Hemminger
2019-06-24 8:15 ` Gaëtan Rivet [this message]
2019-06-24 15:23 ` Stephen Hemminger
2019-06-24 16:27 ` Gaëtan Rivet
2019-07-17 18:21 ` Ferruh Yigit
2019-07-18 11:18 ` Gaëtan Rivet
2019-07-19 12:36 ` Ferruh Yigit
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=20190624081558.bsu3j2inahwumlzj@bidouze.vm.6wind.com \
--to=gaetan.rivet@6wind.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).