igb: reserve VFIO vector zero for misc interrupt
[dpdk.git] / drivers / net / virtio / virtio_ethdev.c
index 2ba7dea..74c00ee 100644 (file)
@@ -1279,15 +1279,18 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
        }
 
        /* Allocate memory for storing MAC addresses */
-       eth_dev->data->mac_addrs = rte_zmalloc("virtio", ETHER_ADDR_LEN, 0);
+       eth_dev->data->mac_addrs = rte_zmalloc("virtio", VIRTIO_MAX_MAC_ADDRS * ETHER_ADDR_LEN, 0);
        if (eth_dev->data->mac_addrs == NULL) {
                PMD_INIT_LOG(ERR,
                        "Failed to allocate %d bytes needed to store MAC addresses",
-                       ETHER_ADDR_LEN);
+                       VIRTIO_MAX_MAC_ADDRS * ETHER_ADDR_LEN);
                return -ENOMEM;
        }
 
        pci_dev = eth_dev->pci_dev;
+
+       rte_eth_copy_pci_info(eth_dev, pci_dev);
+
        if (virtio_resource_init(pci_dev) < 0)
                return -1;