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

Reply via email to