[dpdk-dev] [PATCH] devargs: do not replace already inserted devargs

Stojaczyk, Dariusz dariusz.stojaczyk at intel.com
Thu Nov 8 13:35:01 CET 2018


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Thursday, November 8, 2018 1:26 PM
> To: Stojaczyk, Dariusz <dariusz.stojaczyk at intel.com>
> Cc: dev at dpdk.org; gaetan.rivet at 6wind.com; Zhang, Qi Z
> <qi.z.zhang at intel.com>; Guo, Jia <jia.guo at intel.com>
> Subject: Re: [PATCH] devargs: do not replace already inserted devargs
> 
> 08/11/2018 12:25, Stojaczyk, Dariusz:
> > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > >
> > > The devargs of a device can be replaced by a newly allocated one
> > > when trying to probe again the same device (multi-process or
> > > multi-ports scenarios). This is breaking some pointer references.
> > >
> > > It can be avoided by copying the new content, freeing the new devargs,
> > > and returning the already inserted pointer.
> > >
> > > Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> >
> > Tested-by: Darek Stojaczyk <dariusz.stojaczyk at intel.com>
> 
> Is it fixing any use case?
> 

Of course it is. I was previously seeing a regression with the following scenario:
1. hotplug device in the primary process
2. start a secodary process
3. hotplug device in secondary -> primary segfaults

And now it's working.
D.



More information about the dev mailing list