[dpdk-dev] [PATCH] devargs: do not replace already inserted devargs
Slava Ovsiienko
viacheslavo at mellanox.com
Thu Nov 8 15:02:10 CET 2018
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Stojaczyk, Dariusz
> Sent: Thursday, November 8, 2018 13:25
> To: Thomas Monjalon <thomas at monjalon.net>; dev at dpdk.org
> Cc: gaetan.rivet at 6wind.com; Zhang, Qi Z <qi.z.zhang at intel.com>; Guo, Jia
> <jia.guo at intel.com>
> Subject: Re: [dpdk-dev] [PATCH] devargs: do not replace already inserted
> devargs
>
>
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > Sent: Thursday, November 8, 2018 12:21 AM
> > To: dev at dpdk.org
> > Cc: gaetan.rivet at 6wind.com; Zhang, Qi Z <qi.z.zhang at intel.com>; Guo,
> > Jia <jia.guo at intel.com>; Stojaczyk, Dariusz
> > <dariusz.stojaczyk at intel.com>
> > Subject: [PATCH] devargs: do not replace already inserted devargs
> >
> > 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>
Attaching the representors caused segmentation fault.
The scenario:
- setup with SRIOV enabled, PF plus N VF
- switchdev mode enabled (have representor for E-Switch ports)
- run testpmd specifying PF only, one device probed and one port is created
- trying to attach representor with port attach command
- segmentation fault occurs within rte_eth_devargs_parse ()
The patch fixes this issue.
Tested-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
More information about the dev
mailing list