diff mbox

[dpdk-dev,RFC,PATCHv2,6/8] virtio: enable MSI-X on OSv

Message ID 1426908185-27940-7-git-send-email-syuu@cloudius-systems.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Takuya ASADA March 21, 2015, 3:23 a.m. UTC
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(-)
diff mbox

Patch

diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index 603be2d..fed65f3 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -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)
 {