X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=drivers%2Fnet%2Fvirtio%2Fvirtio_user_ethdev.c;h=a7d7063c2a8869d37e628b4e974bbe9e8c274f9a;hb=5729407fa4d612b93ceefacef13f57c1de2ceaa6;hp=90fcd6e7cc2652767b81ced2b56a656f5eba16db;hpb=c995b00572f88792b8257e59ad5abe82cd95e8dd;p=dpdk.git diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 90fcd6e7cc..a7d7063c2a 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -398,7 +398,7 @@ virtio_user_backend_type(const char *path) if (errno == ENOENT) return VIRTIO_USER_BACKEND_VHOST_USER; - PMD_INIT_LOG(ERR, "Stat fails: %s (%s)\n", path, + PMD_INIT_LOG(ERR, "Stat fails: %s (%s)", path, strerror(errno)); return VIRTIO_USER_BACKEND_UNKNOWN; } @@ -657,9 +657,16 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev) goto end; } + /* + * Virtio-user requires using virtual addresses for the descriptors + * buffers, whatever other devices require + */ + hw->use_va = true; + /* previously called by pci probing for physical dev */ if (eth_virtio_dev_init(eth_dev) < 0) { PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails"); + virtio_user_dev_uninit(dev); virtio_user_eth_dev_free(eth_dev); goto end; } @@ -682,14 +689,10 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev) ret = 0; end: - if (kvlist) - rte_kvargs_free(kvlist); - if (path) - free(path); - if (mac_addr) - free(mac_addr); - if (ifname) - free(ifname); + rte_kvargs_free(kvlist); + free(path); + free(mac_addr); + free(ifname); return ret; } @@ -769,7 +772,6 @@ static struct rte_vdev_driver virtio_user_driver = { .remove = virtio_user_pmd_remove, .dma_map = virtio_user_pmd_dma_map, .dma_unmap = virtio_user_pmd_dma_unmap, - .drv_flags = RTE_VDEV_DRV_NEED_IOVA_AS_VA, }; RTE_PMD_REGISTER_VDEV(net_virtio_user, virtio_user_driver);