DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/librte_vhost: add CONFIG_RTE_LIBRTE_VHOST_USER switch
@ 2015-03-12 15:30 Huawei Xie
  2015-03-13  2:50 ` Ouyang, Changchun
  0 siblings, 1 reply; 3+ messages in thread
From: Huawei Xie @ 2015-03-12 15:30 UTC (permalink / raw)
  To: dev

Turn on CONFIG_RTE_LIBRTE_VHOST to enable vhost.
vhost-user is turned on by default. Turn off CONFIG_RTE_LIBRTE_VHOST_USER to
enable vhost-cuse implementation.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
---
 config/common_linuxapp    |  4 +++-
 lib/librte_vhost/Makefile | 11 +++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/config/common_linuxapp b/config/common_linuxapp
index 97f1c9e..09a58ac 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -414,10 +414,12 @@ CONFIG_RTE_KNI_VHOST_DEBUG_TX=n
 
 #
 # Compile vhost library
-# fuse-devel is needed to run vhost.
+# fuse-devel is needed to run vhost-cuse.
 # fuse-devel enables user space char driver development
+# vhost-user is turned on by default.
 #
 CONFIG_RTE_LIBRTE_VHOST=n
+CONFIG_RTE_LIBRTE_VHOST_USER=y
 CONFIG_RTE_LIBRTE_VHOST_DEBUG=n
 
 #
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 52f6575..a8645a6 100644
--- a/lib/librte_vhost/Makefile
+++ b/lib/librte_vhost/Makefile
@@ -39,13 +39,20 @@ EXPORT_MAP := rte_vhost_version.map
 LIBABIVER := 1
 
 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -D_FILE_OFFSET_BITS=64
-CFLAGS += -I vhost_cuse -lfuse
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),y)
 CFLAGS += -I vhost_user
+else
+CFLAGS += -I vhost_cuse -lfuse
 LDFLAGS += -lfuse
+endif
+
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := virtio-net.c vhost_rxtx.c
-#SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_cuse/vhost-net-cdev.c vhost_cuse/virtio-net-cdev.c vhost_cuse/eventfd_copy.c
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),y)
 SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_user/vhost-net-user.c vhost_user/virtio-net-user.c vhost_user/fd_man.c
+else
+SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_cuse/vhost-net-cdev.c vhost_cuse/virtio-net-cdev.c vhost_cuse/eventfd_copy.c
+endif
 
 # install includes
 SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_virtio_net.h
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: add CONFIG_RTE_LIBRTE_VHOST_USER switch
  2015-03-12 15:30 [dpdk-dev] [PATCH] lib/librte_vhost: add CONFIG_RTE_LIBRTE_VHOST_USER switch Huawei Xie
@ 2015-03-13  2:50 ` Ouyang, Changchun
  2015-03-16 23:38   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ouyang, Changchun @ 2015-03-13  2:50 UTC (permalink / raw)
  To: Xie, Huawei, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie
> Sent: Thursday, March 12, 2015 11:30 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] lib/librte_vhost: add
> CONFIG_RTE_LIBRTE_VHOST_USER switch
> 
> Turn on CONFIG_RTE_LIBRTE_VHOST to enable vhost.
> vhost-user is turned on by default. Turn off
> CONFIG_RTE_LIBRTE_VHOST_USER to enable vhost-cuse implementation.
> 
> Signed-off-by: Huawei Xie <huawei.xie@intel.com>

Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: add CONFIG_RTE_LIBRTE_VHOST_USER switch
  2015-03-13  2:50 ` Ouyang, Changchun
@ 2015-03-16 23:38   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-03-16 23:38 UTC (permalink / raw)
  To: Xie, Huawei; +Cc: dev

2015-03-13 02:50, Ouyang, Changchun:
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie
> > Turn on CONFIG_RTE_LIBRTE_VHOST to enable vhost.
> > vhost-user is turned on by default. Turn off
> > CONFIG_RTE_LIBRTE_VHOST_USER to enable vhost-cuse implementation.
> > 
> > Signed-off-by: Huawei Xie <huawei.xie@intel.com>
> 
> Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>

Applied, thanks

Later this option should be removed to allow using both implementations.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-16 23:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 15:30 [dpdk-dev] [PATCH] lib/librte_vhost: add CONFIG_RTE_LIBRTE_VHOST_USER switch Huawei Xie
2015-03-13  2:50 ` Ouyang, Changchun
2015-03-16 23:38   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).