[dpdk-dev] [PATCH v3 09/12] virtio: vfio: Enable RTE_PCI_DRV_NEED_MAPPING flag in driver

Santosh Shukla sshukla at mvista.com
Thu Jan 7 17:33:06 CET 2016


Flag required for vfio case, It helps to update vfio_dev_fd for each
virtio net interface.

Signed-off-by: Santosh Shukla <sshukla at mvista.com>
---
 drivers/net/virtio/virtio_ethdev.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 9ca99d5..8d55049 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1447,7 +1447,11 @@ static struct eth_driver rte_virtio_pmd = {
 	.pci_drv = {
 		.name = "rte_virtio_pmd",
 		.id_table = pci_id_virtio_map,
+#ifdef RTE_EAL_VFIO
+		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE,
+#else
 		.drv_flags = RTE_PCI_DRV_DETACHABLE,
+#endif
 	},
 	.eth_dev_init = eth_virtio_dev_init,
 	.eth_dev_uninit = eth_virtio_dev_uninit,
-- 
1.7.9.5



More information about the dev mailing list