[dpdk-dev] [PATCH v5 09/11] virtio_pci: do not parse if interface is vfio-noiommu
Santosh Shukla
sshukla at mvista.com
Tue Jan 19 12:46:10 CET 2016
If virtio interface attached to vfio-noiommu driver then
do not parse for virtio resource. Instead exit with return 0;
Note: Applicable for virtio spec 0.95.
Signed-off-by: Santosh Shukla <sshukla at mvista.com>
---
v4-->v5:
- added _NOIOMMU drv check for lagecy virtio. No need for resource_init in vfio
case. And resource_pasrsing/interface validation done by pci_eal module for
pmd driver.
drivers/net/virtio/virtio_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 537c552..520e540 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -514,7 +514,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_NOIOMMU)
+ return 0;
+ else if (virtio_resource_init_by_uio(pci_dev) == 0)
return 0;
else
return virtio_resource_init_by_ioports(pci_dev);
--
1.7.9.5
More information about the dev
mailing list