DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, "Gaëtan Rivet" <gaetan.rivet@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] net/failsafe: do not probe device if plugged out
Date: Tue, 18 Jul 2017 23:49:55 +0300	[thread overview]
Message-ID: <2216873.ENK3EkxbcF@xps> (raw)
In-Reply-To: <c4130efe-fec9-2e83-33d5-279fd5bd9bfe@intel.com>

18/07/2017 11:39, Ferruh Yigit:
> On 7/13/2017 10:17 AM, Thomas Monjalon wrote:
> > 13/07/2017 10:14, Gaëtan Rivet:
> >> On Thu, Jul 13, 2017 at 08:52:33AM +0200, Thomas Monjalon wrote:
> >>> 12/07/2017 22:39, Gaëtan Rivet:
> >>>> Hi Thomas,
> >>>>
> >>>> Nice idea. A few remarks below:
> >>>>
> >>>> On Wed, Jul 12, 2017 at 08:28:12PM +0200, Thomas Monjalon wrote:
> >>>>>  	FOREACH_SUBDEV(sdev, i, dev) {
> >>>>>  		if (sdev->state != DEV_PARSED)
> >>>>>  			continue;
> >>>>>  		da = &sdev->devargs;
> >>>>> +
> >>>>
> >>>> Superfluous line.
> >>>
> >>> I don't think so :) It is isolating the "skip" block with its comment.
> >>>
> >>>>> +		/* skip plugged out devices */
> >>>>> +		if (! first_init
> >>>>> +				&& sdev->cmdline == NULL
> >>>>> +				&& strcmp(da->bus->name, "vdev") != 0) {
> >>>>
> >>>> Use first_init == false instead of negation.
> >>>> && should be at the end of the line instead of the start of the next
> >>>> one.
> >>>
> >>> Yes
> >>>
> >>>> Indentation is wrong.
> >>>
> >>> No, the coding style is to put 2 tabs for continuation lines.
> >>>
> >>>>> +			da->bus->scan();
> >>>>> +			if (bus->find_device(NULL, cmp_dev_name, da->name) == NULL)
> >>>>> +				continue; /* device not found */
> >>>>
> >>>> da->bus->find_device instead of bus->find_device.
> >>>> This function cannot find the device back currently on the PCI bus,
> >>>> blocking the plugging of VF.
> >>>>
> >>>> The PCI bus will scan the VF while no rte_devargs exists to
> >>>> describe it within the global list. If the device exists, it will
> >>>> detect it, allocate it and then set its name.
> >>>> Without any rte_devargs, the name of a PCI device falls back to its
> >>>> canonical name (DomBDF instead of BDF). The name comparison with
> >>>> da->name can only succeed if the slave was declared using the DomBDF
> >>>> format.
> >>>>
> >>>> The fix is to do a deep copy of the rte_devargs (the API has been
> >>>> sent previously with the rte_devargs rework but I have since removed
> >>>> it) and insert it using rte_eal_devargs_insert(). This is essentially
> >>>> the solution I used for the rte_eal_hotplug_add() fix[1].
> >>>>
> >>>> The alternative fix is to propose an API for buses to transform device
> >>>> names into their canonical form on demand... And it would certainly only
> >>>> be useful for the PCI bus.
> >>>>
> >>>> The issue is discussed there:
> >>>> [1]: http://dpdk.org/ml/archives/dev/2017-July/071155.html
> >>>
> >>> OK, I was not aware of this exact issue.
> >>> So I will wait above fix.
> >>
> >> The fix above will not solve this issue.
> >> If you are waiting for a proper, general fix, I don't think it will
> >> arrive anytime soon.
> >>
> >> I have the rte_eal_devargs_clone and a working version that I can send
> >> in-reply-to if you want. But that's an API extension while in RC2 so...
> > 
> > No worries, it can be fixed in 17.11.
> > 
> 
> What is the status of the patch, is this patch rejected for this
> release, or will be merged into existing failsafe?

I think this patch is rejected.

      reply	other threads:[~2017-07-18 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 18:28 Thomas Monjalon
2017-07-12 20:39 ` Gaëtan Rivet
2017-07-13  6:52   ` Thomas Monjalon
2017-07-13  8:14     ` Gaëtan Rivet
2017-07-13  9:17       ` Thomas Monjalon
2017-07-18  8:39         ` Ferruh Yigit
2017-07-18 20:49           ` Thomas Monjalon [this message]

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=2216873.ENK3EkxbcF@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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 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).