[dpdk-dev,v6,8/8] virtio: do not parse if interface is vfio
Commit Message
If virtio interface attached to vfio driver then
do not parse for virtio resource. Instead exit with return 0;
Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
v5-->v6:
- Removed _noimmu and using deafult rte_kdrv_vfio for drv check.
drivers/net/virtio/virtio_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -515,7 +515,9 @@ virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)
static int
legacy_virtio_resource_init(struct rte_pci_device *pci_dev)
{
- if (virtio_resource_init_by_uio(pci_dev) == 0)
+ if (pci_dev->kdrv == RTE_KDRV_VFIO)
+ return 0;
+ else if (virtio_resource_init_by_uio(pci_dev) == 0)
return 0;
else
return virtio_resource_init_by_ioports(pci_dev);