From 777cb78767fd0ca821dad79691ee3200de66f06e Mon Sep 17 00:00:00 2001 From: Daniele Di Proietto Date: Fri, 20 Mar 2015 06:02:14 -0700 Subject: [PATCH] DPDK: Update documentation and travis build for vhost. DPDK vhost support is mandatory to compile OVS with DPDK. This commit updates INSTALL.DPDK.md and the travis build procedure to reflect that. Signed-off-by: Daniele Di Proietto Acked-by: Pravin B Shelar --- .travis/build.sh | 1 + .travis/prepare.sh | 3 +++ INSTALL.DPDK.md | 21 +++++++++------------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.travis/build.sh b/.travis/build.sh index 942265af352..b6b701c3adb 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -48,6 +48,7 @@ function install_dpdk() fi find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/' sed -ri 's,(CONFIG_RTE_BUILD_COMBINE_LIBS=).*,\1y,' config/common_linuxapp + sed -ri 's,(CONFIG_RTE_LIBRTE_VHOST=).*,\1y,' config/common_linuxapp sed -ri '/CONFIG_RTE_LIBNAME/a CONFIG_RTE_BUILD_FPIC=y' config/common_linuxapp sed -ri '/EXECENV_CFLAGS = -pthread -fPIC/{s/$/\nelse ifeq ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS = -pthread -fPIC/}' mk/exec-env/linuxapp/rte.vars.mk make config CC=gcc T=x86_64-native-linuxapp-gcc diff --git a/.travis/prepare.sh b/.travis/prepare.sh index a78282be5f9..cda80c22b66 100755 --- a/.travis/prepare.sh +++ b/.travis/prepare.sh @@ -3,6 +3,9 @@ sudo apt-get update -qq sudo apt-get install -qq libssl-dev llvm-dev sudo apt-get install -qq gcc-multilib +if [ "$DPDK" ]; then + sudo apt-get install -qq libfuse-dev +fi git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git cd sparse && make && sudo make install PREFIX=/usr && cd .. diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md index a3e2a1db8c8..5b61272331f 100644 --- a/INSTALL.DPDK.md +++ b/INSTALL.DPDK.md @@ -16,8 +16,7 @@ OVS needs a system with 1GB hugepages support. Building and Installing: ------------------------ -Required DPDK 1.8.0 -Optional `fuse`, `fuse-devel` +Required DPDK 1.8.0, `fuse`, `fuse-devel` (`libfuse-dev` on Debian/Ubuntu) 1. Configure build & install DPDK: 1. Set `$DPDK_DIR` @@ -32,7 +31,12 @@ Optional `fuse`, `fuse-devel` `CONFIG_RTE_BUILD_COMBINE_LIBS=y` - Then run `make install` to build and isntall the library. + Update `config/common_linuxapp` so that DPDK is built with vhost + libraries: + + `CONFIG_RTE_LIBRTE_VHOST=y` + + Then run `make install` to build and install the library. For default install without IVSHMEM: `make install T=x86_64-native-linuxapp-gcc` @@ -300,18 +304,11 @@ in future releases when supported in DPDK and that vhost-cuse will eventually be deprecated. See [DPDK Docs] for more info on vhost. Prerequisites: -1. DPDK 1.8 with vhost support enabled and recompile OVS as above. - - Update `config/common_linuxapp` so that DPDK is built with vhost - libraries: - - `CONFIG_RTE_LIBRTE_VHOST=y` - -2. Insert the Cuse module: +1. Insert the Cuse module: `modprobe cuse` -3. Build and insert the `eventfd_link` module: +2. Build and insert the `eventfd_link` module: `cd $DPDK_DIR/lib/librte_vhost/eventfd_link/` `make`