[dpdk-dev] [PATCH] net/virtio-user: fix recognize physical devices

Yuanhan Liu yuanhan.liu at linux.intel.com
Wed Apr 26 03:26:24 CEST 2017

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 at intel.com>

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


More information about the dev mailing list