[dpdk-dev] [PATCH 5/6] virtio: set RTE_PCI_DRV_NEED_MAPPING flag

Yuanhan Liu yuanhan.liu at linux.intel.com
Thu Dec 10 04:54:09 CET 2015


We need to to map pci bar space for enabling modern virtio pci device,
as all modern configs are stored at pci bar space.

Setting RTE_PCI_DRV_NEED_MAPPING flag will let eal do that for us.

Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 94e0c4a..9847ed8 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1169,7 +1169,7 @@ static struct eth_driver rte_virtio_pmd = {
 	.pci_drv = {
 		.name = "rte_virtio_pmd",
 		.id_table = pci_id_virtio_map,
-		.drv_flags = RTE_PCI_DRV_DETACHABLE,
+		.drv_flags = RTE_PCI_DRV_DETACHABLE | RTE_PCI_DRV_NEED_MAPPING,
 	},
 	.eth_dev_init = eth_virtio_dev_init,
 	.eth_dev_uninit = eth_virtio_dev_uninit,
-- 
1.9.0



More information about the dev mailing list