From patchwork Mon Dec 11 16:00:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 121424 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2978318qgn; Mon, 11 Dec 2017 08:06:38 -0800 (PST) X-Google-Smtp-Source: ACJfBovhAPbBRJTwDS0+mCdx4sGcrZ+pLFv35gu8DhsWdfy2OD9a+kvx10D9qAIv4ejr4aptWSm2 X-Received: by 10.200.22.209 with SMTP id y17mr1236199qtk.284.1513008398506; Mon, 11 Dec 2017 08:06:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008398; cv=none; d=google.com; s=arc-20160816; b=FTr5WcGorrSKtdt+lIEjI3UkcrIBDaAmg9g/qYbAOeGn7JdYoIyGWPXEc19MPhAMxa 0GBQpExQoA7nFIhYhQxnWhUwaF0lxW9R1yuryzAu7l1vTFEM4uLgDmDDAnoCQz8/+qS9 E2ow5LYNQ53FESGnojLchy9w0DBTUn/1TkPQYEt3yT6H/7HSN1YYTch63d97y/mlz/GC RKTNbnYDH+JmdFTpAAmvNN3JZhNtYmueCavaP40jiC86qmFVX9pXA6fxHDMlXjzuf22I RvkbybQ1yCpTTDk9aAGeTIhnn6cFk+YrWqB01OqYW1Wy0MYzQQIVuWRxIUguCwe5lTbl XO4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=EsUdv9UBVIc5YDS6hb15qJnUWGtaDnE6lRT82Xs6Z1Y=; b=HDOiv1md8jtRkMl3qBTr80HDmS3Z7aJ053Ifo+tNmcpfP6koznG/CPva/RuJGZ5bE3 fzXhuM0zf8VRFxt9u41tasARooe/8ZHryx68PiBGNEWEHigIJUKKyH4dQjdjBqaBL3Je ogSvmDsDvIDtYD/HcLgB2Q3402sIl02XSvnwODFqjk+3V2wz+qGS3H7jzzsdlyn7KWjC OjjalYIuM4/BYxQ/6jVoaGqKg+HM/GXC/QCDD6M2mAjy6zEki+utqGSexh4jfxUSIXQw COWcfJorgOqgGC5Tk0gDOmQrXNNumDeb3AK6kQgqehwjqfUhMq5MV/F3jX1sp4CUwoWN xDLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id s127si1200311qkf.261.2017.12.11.08.06.38; Mon, 11 Dec 2017 08:06:38 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 2B8D9608E8; Mon, 11 Dec 2017 16:06:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2B6BA6097D; Mon, 11 Dec 2017 16:01:00 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A851B60964; Mon, 11 Dec 2017 16:00:33 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 9200F608E8 for ; Mon, 11 Dec 2017 16:00:21 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 20DC56A83E9B for ; Mon, 11 Dec 2017 19:00:19 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id BCt9Bycsk1-0JtiOgmU; Mon, 11 Dec 2017 19:00:19 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0ITmWYlC; Mon, 11 Dec 2017 19:00:18 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 11 Dec 2017 19:00:08 +0300 Message-Id: <1513008012-9231-11-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 10/14] travis: also use DPDK when doing cross-compile tests X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Compile and use DPDK when doing cross-compilation tests. This enables us to test that pktio/dpdk.c works on non-x86 targets. Signed-off-by: Dmitry Eremin-Solenikov Reviewed-and-tested-by: Matias Elo --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ .travis.yml | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a30326724..25c2d0a53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,7 +99,8 @@ before_install: else sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install g++-"$CROSS_GNU_TYPE" ; fi ; - sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libc6-dev:"$CROSS_ARCH" libssl-dev:"$CROSS_ARCH" zlib1g-dev:"$CROSS_ARCH" libconfig-dev:"$CROSS_ARCH" libstdc++-4.8-dev:"$CROSS_ARCH"; + sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libc6-dev:"$CROSS_ARCH" libssl-dev:"$CROSS_ARCH" zlib1g-dev:"$CROSS_ARCH" libconfig-dev:"$CROSS_ARCH" libstdc++-4.8-dev:"$CROSS_ARCH" libpcap0.8-dev:"$CROSS_ARCH" ; + [ "$CROSS_ARCH" = "armhf" ] || sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libnuma-dev:"$CROSS_ARCH"; export PKG_CONFIG_PATH=/usr/lib/${CROSS_MULTIARCH}/pkgconfig:/usr/${CROSS_MULTIARCH}/lib/pkgconfig ; fi - if [ "${CC#clang}" != "${CC}" ] ; @@ -107,16 +108,24 @@ before_install: if [ -n "$CROSS_ARCH" ] ; then export CC="${CC} --target=$CROSS_GNU_TYPE" ; + if [ "$CROSS_ARCH" = "i386" ] ; + then + DPDK_CFLAGS="-m32" ; + else + DPDK_CROSS="$CROSS_GNU_TYPE-" ; + fi fi ; export CXX="${CC/clang/clang++}"; elif [ "$CROSS_ARCH" = "i386" ] ; then export CC="gcc -m32" ; export CXX="g++ -m32" ; + DPDK_CFLAGS="-m32" ; elif [ -n "$CROSS_ARCH" ] ; then export CC="$CROSS_GNU_TYPE"-gcc ; export CXX="$CROSS_GNU_TYPE"-g++ ; + DPDK_CROSS="$CROSS_GNU_TYPE-" ; fi - if test ! -L /usr/lib/ccache/${CC%% *} ; then sudo ln -s -t /usr/lib/ccache/ `which ${CC%% *}` ; fi - ccache -s @@ -174,21 +183,48 @@ install: if [ "${CACHED_DPDK_VERS}" != "${DPDK_VERS}" ]; then rm -rf dpdk fi - - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"} - | - if [ -z "$CROSS_ARCH" -a ! -f "dpdk/${TARGET}/lib/libdpdk.a" ]; then + case "$CROSS_ARCH" in + "arm64") + TARGET="arm64-armv8a-linuxapp-gcc" + ;; + "armhf") + TARGET="arm-armv7a-linuxapp-gcc" + ;; + "i386") + TARGET="i686-native-linuxapp-gcc" + ;; + "") + TARGET="x86_64-native-linuxapp-gcc" + DPDK_MACHINE=snb + ;; + esac + - | + if [ -n "$TARGET" -a ! -f "dpdk/${TARGET}/lib/libdpdk.a" ]; then git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v${DPDK_VERS} http://dpdk.org/git/dpdk dpdk pushd dpdk git log --oneline --decorate + echo $CC + # AArch64 && ARMv7 fixup + sed -i -e 's/40900/40800/g' lib/librte_eal/common/include/arch/arm/rte_vect.h + sed -i -e 's/!(/!(defined(__arm__) \&\& defined(__clang__) || /g' lib/librte_eal/common/include/arch/arm/rte_byteorder.h + sed -i -e 's/__GNUC__/defined(__arm__) \&\& defined(__clang__) || __GNUC__/' lib/librte_eal/common/include/generic/rte_byteorder.h make config T=${TARGET} O=${TARGET} pushd ${TARGET} sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config cat .config |grep RTE_MACHINE - sed -ri 's,(CONFIG_RTE_MACHINE=).*,\1"snb",' .config + if test -n "${DPDK_MACHINE}" ; then + sed -ri 's,(CONFIG_RTE_MACHINE=).*,\1"'${DPDK_MACHINE}'",' .config + fi + if test -n "$CROSS_ARCH" ; then + sed -ri -e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1n,' .config + sed -ri -e 's,(CONFIG_RTE_KNI_KMOD=).*,\1n,' .config + fi popd - make install T=${TARGET} EXTRA_CFLAGS="-fPIC" + make install T=${TARGET} EXTRA_CFLAGS="-fPIC $DPDK_CFLAGS" CROSS="$DPDK_CROSS" rm -r ./doc ./${TARGET}/app ./${TARGET}/build popd + EXTRA_CONF="$EXTRA_CONF --with-dpdk-path=`pwd`/dpdk/${TARGET}" fi # Netmap pktio @@ -202,12 +238,10 @@ install: popd fi sudo insmod ./netmap/LINUX/netmap.ko + EXTRA_CONF="$EXTRA_CONF --with-netmap-path=`pwd`/netmap" fi script: - - if [ -z "$CROSS_ARCH" ] ; then - EXTRA_CONF="--with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap" ; - fi - ./bootstrap - ./configure --prefix=$HOME/odp-install --enable-user-guides