]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/virtio/virtio_ethdev.c
net/virtio-user: fix device type check
[dpdk.git] / drivers / net / virtio / virtio_ethdev.c
index cd87c0eb3dd00e5720ccbb7e932d7af114de4db9..73e5da8c54916c1f267cc00574d720f9c1cf7023 100644 (file)
@@ -1348,7 +1348,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
        if (virtio_negotiate_features(hw, req_features) < 0)
                return -1;
 
-       if (eth_dev->device) {
+       if (!hw->virtio_user_dev) {
                pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
                rte_eth_copy_pci_info(eth_dev, pci_dev);
        }