[dpdk-dev,v4,5/5] lib/librte_vhost: add vhost lib support in makefile
Commit Message
The build of vhost lib requires fuse development package. It is turned off by
default so as not to break DPDK build.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Tommy Long <thomas.long@intel.com>
---
config/common_linuxapp | 7 +++++++
lib/Makefile | 1 +
mk/rte.app.mk | 5 +++++
3 files changed, 13 insertions(+)
Comments
Will dpdk develop a vhost-user lib for the vhost-user backend of qemu?
On 2014/9/12 18:55, Huawei Xie wrote:
> The build of vhost lib requires fuse development package. It is turned off by
> default so as not to break DPDK build.
>
> Signed-off-by: Huawei Xie <huawei.xie@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Acked-by: Tommy Long <thomas.long@intel.com>
> ---
> config/common_linuxapp | 7 +++++++
> lib/Makefile | 1 +
> mk/rte.app.mk | 5 +++++
> 3 files changed, 13 insertions(+)
>
> diff --git a/config/common_linuxapp b/config/common_linuxapp
> index 9047975..c7c1c83 100644
> --- a/config/common_linuxapp
> +++ b/config/common_linuxapp
> @@ -390,6 +390,13 @@ CONFIG_RTE_KNI_VHOST_DEBUG_RX=n
> CONFIG_RTE_KNI_VHOST_DEBUG_TX=n
>
> #
> +# Compile vhost library
> +# fuse, fuse-devel, kernel-modules-extra packages are needed
> +#
> +CONFIG_RTE_LIBRTE_VHOST=n
> +CONFIG_RTE_LIBRTE_VHOST_DEBUG=n
> +
> +#
> #Compile Xen domain0 support
> #
> CONFIG_RTE_LIBRTE_XEN_DOM0=n
> diff --git a/lib/Makefile b/lib/Makefile
> index 10c5bb3..007c174 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -60,6 +60,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter
> DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += librte_sched
> DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs
> DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += librte_distributor
> +DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += librte_vhost
> DIRS-$(CONFIG_RTE_LIBRTE_PORT) += librte_port
> DIRS-$(CONFIG_RTE_LIBRTE_TABLE) += librte_table
> DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += librte_pipeline
> diff --git a/mk/rte.app.mk b/mk/rte.app.mk
> index 34dff2a..285b65c 100644
> --- a/mk/rte.app.mk
> +++ b/mk/rte.app.mk
> @@ -190,6 +190,11 @@ ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
> LDLIBS += -lrte_pmd_virtio_uio
> endif
>
> +ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
> +LDLIBS += -lrte_vhost
> +LDLIBS += -lfuse
> +endif
> +
> ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
> LDLIBS += -lrte_pmd_i40e
> endif
>
@@ -390,6 +390,13 @@ CONFIG_RTE_KNI_VHOST_DEBUG_RX=n
CONFIG_RTE_KNI_VHOST_DEBUG_TX=n
#
+# Compile vhost library
+# fuse, fuse-devel, kernel-modules-extra packages are needed
+#
+CONFIG_RTE_LIBRTE_VHOST=n
+CONFIG_RTE_LIBRTE_VHOST_DEBUG=n
+
+#
#Compile Xen domain0 support
#
CONFIG_RTE_LIBRTE_XEN_DOM0=n
@@ -60,6 +60,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter
DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += librte_sched
DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs
DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += librte_distributor
+DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += librte_vhost
DIRS-$(CONFIG_RTE_LIBRTE_PORT) += librte_port
DIRS-$(CONFIG_RTE_LIBRTE_TABLE) += librte_table
DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += librte_pipeline
@@ -190,6 +190,11 @@ ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
LDLIBS += -lrte_pmd_virtio_uio
endif
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
+LDLIBS += -lrte_vhost
+LDLIBS += -lfuse
+endif
+
ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
LDLIBS += -lrte_pmd_i40e
endif