[27/28] config: add option for the virtio-vhost-user transport
diff mbox series

Message ID 1560957293-17294-28-git-send-email-ndragazis@arrikto.com
State RFC, archived
Delegated to: Maxime Coquelin
Headers show
Series
  • vhost: add virtio-vhost-user transport
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Nikos Dragazis June 19, 2019, 3:14 p.m. UTC
Add a configuration option for compiling and linking with the
virtio-vhost-user library.

Signed-off-by: Nikos Dragazis <ndragazis@arrikto.com>
---
 config/common_base  | 6 ++++++
 config/common_linux | 1 +
 drivers/Makefile    | 5 ++++-
 mk/rte.app.mk       | 2 +-
 4 files changed, 12 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/config/common_base b/config/common_base
index 6f19ad5..2559d69 100644
--- a/config/common_base
+++ b/config/common_base
@@ -963,6 +963,12 @@  CONFIG_RTE_LIBRTE_VHOST_DEBUG=n
 CONFIG_RTE_LIBRTE_PMD_VHOST=n
 
 #
+# Compile virtio-vhost-user library
+# To compile, CONFIG_RTE_LIBRTE_VHOST should be enabled.
+#
+CONFIG_RTE_LIBRTE_VIRTIO_VHOST_USER=n
+
+#
 # Compile IFC driver
 # To compile, CONFIG_RTE_LIBRTE_VHOST and CONFIG_RTE_EAL_VFIO
 # should be enabled.
diff --git a/config/common_linux b/config/common_linux
index 7533427..7e4279f 100644
--- a/config/common_linux
+++ b/config/common_linux
@@ -17,6 +17,7 @@  CONFIG_RTE_LIBRTE_VHOST=y
 CONFIG_RTE_LIBRTE_VHOST_NUMA=y
 CONFIG_RTE_LIBRTE_VHOST_POSTCOPY=n
 CONFIG_RTE_LIBRTE_PMD_VHOST=y
+CONFIG_RTE_LIBRTE_VIRTIO_VHOST_USER=y
 CONFIG_RTE_LIBRTE_IFC_PMD=y
 CONFIG_RTE_LIBRTE_PMD_AF_PACKET=y
 CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y
diff --git a/drivers/Makefile b/drivers/Makefile
index 72e2579..971dc6c 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -22,7 +22,10 @@  DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
 DEPDIRS-event := common bus mempool net
 DIRS-$(CONFIG_RTE_LIBRTE_RAWDEV) += raw
 DEPDIRS-raw := common bus mempool net event
-DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += virtio_vhost_user
+
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VIRTIO_VHOST_USER),yy)
+DIRS-y += virtio_vhost_user
 DEPDIRS-virtio_vhost_user := bus
+endif
 
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 77e02d1..8dd2922 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -132,7 +132,7 @@  ifeq ($(CONFIG_RTE_EAL_VFIO),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS)      += -lrte_bus_fslmc
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y)
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VIRTIO_VHOST_USER),yy)
 _LDLIBS-y += --no-as-needed
 _LDLIBS-y += -lrte_virtio_vhost_user
 _LDLIBS-y += --as-needed