diff mbox

[ovs-dev] travis: Fix build with --enable-shared and DPDK 2.1.

Message ID 1441817044-20734-1-git-send-email-diproiettod@vmware.com
State Accepted
Headers show

Commit Message

Daniele Di Proietto Sept. 9, 2015, 4:44 p.m. UTC
When building OVS with --enable-shared, -fPIC should be used in DPDK
CFLAGS.  We used to add a custom option for this (CONFIG_RTE_BUILD_FPIC)
to the DPDK configuration, right after CONFIG_RTE_LIBNAME.

Since CONFIG_RTE_LIBNAME has been removed, it seems simpler to add our
custom option at the end of the file.

Furthermore, since vhost support is enabled by default in DPDK 2.1 and
vhost-user is OVS primary target, there's no need to customize the vhost
related option anymore.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
---
 .travis/build.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Ben Pfaff Sept. 9, 2015, 4:56 p.m. UTC | #1
On Wed, Sep 09, 2015 at 05:44:04PM +0100, Daniele Di Proietto wrote:
> When building OVS with --enable-shared, -fPIC should be used in DPDK
> CFLAGS.  We used to add a custom option for this (CONFIG_RTE_BUILD_FPIC)
> to the DPDK configuration, right after CONFIG_RTE_LIBNAME.
> 
> Since CONFIG_RTE_LIBNAME has been removed, it seems simpler to add our
> custom option at the end of the file.
> 
> Furthermore, since vhost support is enabled by default in DPDK 2.1 and
> vhost-user is OVS primary target, there's no need to customize the vhost
> related option anymore.
> 
> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>

I'd add a Tested-at: with a pointer to the travis build you did.

Acked-by: Ben Pfaff <blp@nicira.com>
Daniele Di Proietto Sept. 9, 2015, 5:09 p.m. UTC | #2
On 09/09/2015 17:56, "Ben Pfaff" <blp@nicira.com> wrote:

>On Wed, Sep 09, 2015 at 05:44:04PM +0100, Daniele Di Proietto wrote:
>> When building OVS with --enable-shared, -fPIC should be used in DPDK
>> CFLAGS.  We used to add a custom option for this (CONFIG_RTE_BUILD_FPIC)
>> to the DPDK configuration, right after CONFIG_RTE_LIBNAME.
>> 
>> Since CONFIG_RTE_LIBNAME has been removed, it seems simpler to add our
>> custom option at the end of the file.
>> 
>> Furthermore, since vhost support is enabled by default in DPDK 2.1 and
>> vhost-user is OVS primary target, there's no need to customize the vhost
>> related option anymore.
>> 
>> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
>
>I'd add a Tested-at: with a pointer to the travis build you did.

Done. Thanks for the review!

>
>Acked-by: Ben Pfaff <blp@nicira.com>
diff mbox

Patch

diff --git a/.travis/build.sh b/.travis/build.sh
index 3cadbf0..1b7aaac 100755
--- a/.travis/build.sh
+++ b/.travis/build.sh
@@ -50,9 +50,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 's,(CONFIG_RTE_LIBRTE_VHOST_USER=).*,\1n,' config/common_linuxapp
-    sed -ri '/CONFIG_RTE_LIBNAME/a CONFIG_RTE_BUILD_FPIC=y' config/common_linuxapp
+    echo '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
     make CC=gcc RTE_KERNELDIR=$KERNELSRC