DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Somnath Kotur <somnath.kotur@broadcom.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com, Gaetan Rivet <grive@u256.net>
Subject: Re: [dpdk-dev] [PATCH v2] eal: fix to set the rte_device ptr's device args before hotplug
Date: Tue, 31 Mar 2020 02:52:49 +0200	[thread overview]
Message-ID: <9670412.U7f9L36N0a@xps> (raw)
In-Reply-To: <c9789a02-d2b9-caeb-ef6f-d5b42b682f6d@u256.net>

14/02/2020 09:24, Gaetan Rivet:
> On 14/02/2020 07:43, Somnath Kotur wrote:
> > As per the comments in this code section, since there is a matching device,
> > it is now its responsibility to manage the devargs we've just inserted.
> > But the matching device ptr's devargs is still uninitialized or not pointing
> > to the newest dev_args that were passed as a parameter to local_dev_probe().
> > This is needed particularly in the case when *probe is called again* on an
> > already probed device as part of adding a representor port to an OVS switch(OVS-DPDK)
> > 
> > Fixes: 7e8b26650146 ("eal: fix hotplug add / remove")
> > Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> > ---
> > --- a/drivers/bus/pci/linux/pci.c
> > +++ b/drivers/bus/pci/linux/pci.c
> > +					else if (dev2->device.devargs !=
> > +						 dev->device.devargs) {
> > +						rte_devargs_remove(dev2->device.devargs);
> > +						pci_name_set(dev2);
> > +					}
> 
> I see that this is already pretty similar in BSD (minus the rte_devargs_remove()),

We really need to review this kind of code for Linux and FreeBSD,
and share the common code.

> so if you have tested and validated that this works properly I'm fine with this patch.
> 
> This might miss a Cc: stable@dpdk.org, otherwise,
> 
> Acked-by: Gaetan Rivet <grive@u256.net>

I don't like how complicate this function is becoming,
but because it's tested and acked,
Applied, thanks

Title updated: bus/pci: fix devargs on probing again



  reply	other threads:[~2020-03-31  0:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  6:43 Somnath Kotur
2020-02-14  8:24 ` Gaetan Rivet
2020-03-31  0:52   ` Thomas Monjalon [this message]
     [not found] ` <CAOBf=mvnb_o90qfN43i3zBYRCLEDQx7W40G+q_41j3f+c7J5Zg@mail.gmail.com>
     [not found]   ` <e835ea74-38d9-e594-1223-f392c88bdbb6@intel.com>
     [not found]     ` <2210365.oX9e4DgFVH@xps>
2020-03-20  4:21       ` Somnath Kotur

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=9670412.U7f9L36N0a@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=grive@u256.net \
    --cc=somnath.kotur@broadcom.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).