Skip to contentSkip to conversation

net/virtio: add driver to meson build

PATCH In review Bruce Richardson 2 participants 3 messages Feb 16, 2018 – Mar 12, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/virtio: add driver to meson build

---
 drivers/net/meson.build        |  2 +-
 drivers/net/virtio/meson.build | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/virtio/meson.build
drivers/net/meson.build +1 -1
index 704cbe3c8..10a361763 100644
@@ -4,7 +4,7 @@
 drivers = ['af_packet', 'bonding',
 	'e1000', 'fm10k', 'i40e', 'ixgbe',
 	'null', 'octeontx', 'pcap', 'ring',
-	'sfc', 'thunderx']
+	'sfc', 'thunderx', 'virtio']
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 std_deps += ['bus_pci']         # very many PMDs depend on PCI, so make std
 std_deps += ['bus_vdev']        # same with vdev bus
drivers/net/virtio/meson.build new file +27 -0
new file mode 100644
index 000000000..e43ce6bbc
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+allow_experimental_apis = true
+sources += files('virtio_ethdev.c',
+	'virtio_pci.c',
+	'virtio_rxtx.c',
+	'virtio_rxtx_simple.c',
+	'virtqueue.c')
+deps += ['kvargs', 'bus_pci']
+
+if arch_subdir == 'x86'
+	sources += files('virtio_rxtx_simple_sse.c')
+elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+	sources += files('virtio_rxtx_simple_neon.c')
+endif
+
+if host_machine.system() == 'linux'
+	dpdk_conf.set('RTE_VIRTIO_USER', 1)
+
+	sources += files('virtio_user_ethdev.c',
+		'virtio_user/vhost_kernel.c',
+		'virtio_user/vhost_kernel_tap.c',
+		'virtio_user/vhost_user.c',
+		'virtio_user/virtio_user_dev.c')
+	deps += ['bus_vdev']
+endif
Signature · 1 line
2.14.3