All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] failsafe: skip devargs if not present in secondary
Date: Mon, 24 Jun 2019 08:23:38 -0700	[thread overview]
Message-ID: <20190624082338.3ddfc6fa@hermes.lan> (raw)
In-Reply-To: <20190624081558.bsu3j2inahwumlzj@bidouze.vm.6wind.com>

On Mon, 24 Jun 2019 10:15:58 +0200
Gaëtan Rivet <gaetan.rivet@6wind.com> wrote:

> 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
> >   
> 

Simpler is better.
Sorry, after working with failsafe my impression is that it is not
built with that in mind.

  reply	other threads:[~2019-06-24 15:23 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
2019-06-24 15:23   ` Stephen Hemminger [this message]
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=20190624082338.3ddfc6fa@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.