[dpdk-dev] [PATCH v2] eal: fix to set the rte_device ptr's device args before hotplug
Thomas Monjalon
thomas at monjalon.net
Tue Mar 31 02:52:49 CEST 2020
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 at 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 at dpdk.org, otherwise,
>
> Acked-by: Gaetan Rivet <grive at 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
More information about the dev
mailing list