From patchwork Fri Nov 9 14:02:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Stokes, Ian" X-Patchwork-Id: 995543 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42s20m0cWvz9sCX for ; Sat, 10 Nov 2018 01:02:47 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 9A995AE0; Fri, 9 Nov 2018 14:02:43 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 2BE619E2 for ; Fri, 9 Nov 2018 14:02:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B13E6836 for ; Fri, 9 Nov 2018 14:02:41 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Nov 2018 06:02:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,483,1534834800"; d="scan'208";a="95012551" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by FMSMGA003.fm.intel.com with ESMTP; 09 Nov 2018 06:02:39 -0800 From: Ian Stokes To: dev@openvswitch.org Date: Fri, 9 Nov 2018 14:02:37 +0000 Message-Id: <1541772157-20926-1-git-send-email-ian.stokes@intel.com> X-Mailer: git-send-email 1.7.0.7 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v1] travis: Add dpdk shared library build. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Add travis builds for DPDK as a shared library. Currently the DPDK builds in travis only compile DPDK as a static library. With static builds in DPDK there is a risk that if a function is not exported then it will not be supported when DPDK is used as a shared library. This commit adds the option to build DPDK as a shared library. Also two build jobs are added to the travis.yml whereby a shared DPDK is built with both static and shared OVS libraries. Signed-off-by: Ian Stokes Acked-by: Tiago Lam Acked-by: Kevin Traynor --- .travis.yml | 2 ++ .travis/linux-build.sh | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2ef8bde5..b74ba2bfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,8 @@ env: - BUILD_ENV="-m32" OPTS="--disable-ssl" - KERNEL=3.16.54 DPDK=1 - KERNEL=3.16.54 DPDK=1 OPTS="--enable-shared" + - KERNEL=3.16.54 DPDK_SHARED=1 + - KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared" - KERNEL=4.17.14 - KERNEL=4.16.18 - KERNEL=4.15.18 diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index 1fe5bbfa9..e9bfb72ff 100755 --- a/.travis/linux-build.sh +++ b/.travis/linux-build.sh @@ -6,6 +6,7 @@ KERNELSRC="" CFLAGS="-Werror" SPARSE_FLAGS="" EXTRA_OPTS="" +TARGET="x86_64-native-linuxapp-gcc" function install_kernel() { @@ -66,7 +67,11 @@ function install_dpdk() find ./ -type f | xargs sed -i 's/-Werror/-Werror -Wno-error=inline/' 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 + if [ "$DPDK_SHARED" ]; then + sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' config/common_base + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib + fi + make config CC=gcc T=$TARGET make CC=gcc RTE_KERNELDIR=$KERNELSRC echo "Installed DPDK source in $(pwd)" cd .. @@ -77,11 +82,11 @@ function configure_ovs() ./boot.sh && ./configure $* } -if [ "$KERNEL" ] || [ "$DPDK" ]; then +if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then install_kernel $KERNEL fi -if [ "$DPDK" ]; then +if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then if [ -z "$DPDK_VER" ]; then DPDK_VER="17.11.4" fi