[dpdk-dev,RFC,6/7] virtio: enable MSI-X on OSv
Commit Message
Add support OSv EAL.
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
---
lib/librte_pmd_virtio/virtio_ethdev.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
@@ -1055,7 +1055,20 @@ static int virtio_resource_init(struct rte_pci_device *pci_dev)
return virtio_resource_init_by_ioports(pci_dev);
}
-#else
+#elif defined(RTE_EXEC_ENV_OSVAPP)
+static int
+virtio_has_msix(const struct rte_pci_addr *loc __rte_unused)
+{
+ /* TODO: ask to OSv this NIC has MSI-X */
+ return 1;
+}
+
+static int virtio_resource_init(struct rte_pci_device *pci_dev __rte_unused)
+{
+ /* no setup required */
+ return 0;
+}
+#else /* BSD */
static int
virtio_has_msix(const struct rte_pci_addr *loc __rte_unused)
{