DPDK patches and discussions
 help / color / mirror / Atom feed
From: Slava Ovsiienko <viacheslavo@mellanox.com>
To: "Stojaczyk, Dariusz" <dariusz.stojaczyk@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "gaetan.rivet@6wind.com" <gaetan.rivet@6wind.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Guo, Jia" <jia.guo@intel.com>
Subject: Re: [dpdk-dev] [PATCH] devargs: do not replace already inserted	devargs
Date: Thu, 8 Nov 2018 14:02:10 +0000	[thread overview]
Message-ID: <AM4PR05MB3265BAA096587850F41EEAE6D2C50@AM4PR05MB3265.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <FBE7E039FA50BF47A673AD0BD3CD56A84622B969@HASMSX105.ger.corp.intel.com>

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Stojaczyk, Dariusz
> Sent: Thursday, November 8, 2018 13:25
> To: Thomas Monjalon <thomas@monjalon.net>; dev@dpdk.org
> Cc: gaetan.rivet@6wind.com; Zhang, Qi Z <qi.z.zhang@intel.com>; Guo, Jia
> <jia.guo@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] devargs: do not replace already inserted
> devargs
> 
> 
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Thursday, November 8, 2018 12:21 AM
> > To: dev@dpdk.org
> > Cc: gaetan.rivet@6wind.com; Zhang, Qi Z <qi.z.zhang@intel.com>; Guo,
> > Jia <jia.guo@intel.com>; Stojaczyk, Dariusz
> > <dariusz.stojaczyk@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@monjalon.net>
> > ---
> 
> Tested-by: Darek Stojaczyk <dariusz.stojaczyk@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@mellanox.com>

      parent reply	other threads:[~2018-11-08 14:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 23:21 Thomas Monjalon
2018-11-08 11:25 ` Stojaczyk, Dariusz
2018-11-08 12:26   ` Thomas Monjalon
2018-11-08 12:35     ` Stojaczyk, Dariusz
2018-11-08 12:53       ` Thomas Monjalon
2018-11-08 17:12     ` Zhang, Qi Z
2018-11-11 23:12       ` Thomas Monjalon
2018-11-08 14:02   ` Slava Ovsiienko [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=AM4PR05MB3265BAA096587850F41EEAE6D2C50@AM4PR05MB3265.eurprd05.prod.outlook.com \
    --to=viacheslavo@mellanox.com \
    --cc=dariusz.stojaczyk@intel.com \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=jia.guo@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=thomas@monjalon.net \
    /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).