DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Jianfeng Tan <jianfeng.tan@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: fix recognize physical devices
Date: Wed, 26 Apr 2017 09:26:24 +0800	[thread overview]
Message-ID: <20170426012624.GE11512@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1492741689-40422-1-git-send-email-jianfeng.tan@intel.com>

On Fri, Apr 21, 2017 at 02:28:09AM +0000, Jianfeng Tan wrote:
> Segfault happens when using virtio-user after commit 7f0a669e7b04
> ("ethdev: add allocation helper for virtual drivers").
> 
> It's due to we use ethdev->device to recognize physical devices,
> but after above commit, this field is also filled for virtual
> devices. Then we obtain the wrong pci_dev pointer and accessing
> its field when copying pci info results in segfault.
> 
> To fix it, we use hw->virtio_user_dev to differentiate physical
> devices from virtual devices.
> 
> Fixes: 6a7c0dfcdf40 ("net/virtio: do not depend on PCI device of ethdev")
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>

Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

	--yliu

  reply	other threads:[~2017-04-26  1:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21  2:28 Jianfeng Tan
2017-04-26  1:26 ` Yuanhan Liu [this message]
2017-04-28  4:49 ` Yuanhan Liu

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=20170426012624.GE11512@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@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).