From patchwork Fri Oct 16 15:18:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 55100 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id E33B622EAC for ; Fri, 16 Oct 2015 13:19:26 +0000 (UTC) Received: by lfbe131 with SMTP id e131sf17897614lfb.3 for ; Fri, 16 Oct 2015 06:19:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=W5BThISq8fuJZUp9IM32MjCbSc0TkB8hRAMgDTHGJAw=; b=EJJMdzFuUYMQWg3nPLLMQ00tjrqm8kOXhaaIQMjNWFDmFiYIcngpZV32hP8UtgsZdg KraGe77KLV3XCW4ZrD16oPt/MvUCPUmEuqdxb9MR5L5Oy36GU3eM4nyZBU5fBnH/MkML T677IgDhDOOhVm2jHS9TYa3P71KOsjYjVgzEHSRFOM4q98RuTr+19zs7Tzuo44CgJGw1 3QvdVTgWW1xSgEsoQZBtvvSKMQDt1Ps0n4pxHYKGwh4zr5008xvPrWrScc7PagPOBTlE ttucT/baO8OVAzh/X/xfc5Xuk1/psXjHdZrKlFaWKGAzfsC4SxsrGaC33gp5AkjFmXeM YBfQ== X-Gm-Message-State: ALoCoQmWgOOBOWlf7o92W6cqFGdi05JtjnSOLEbXnv3WowIeRIHLc+/zevhPFkFCA7NennUoS7mc X-Received: by 10.112.151.9 with SMTP id um9mr3528813lbb.19.1445001565938; Fri, 16 Oct 2015 06:19:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.20.202 with SMTP id 71ls268394lfu.95.gmail; Fri, 16 Oct 2015 06:19:25 -0700 (PDT) X-Received: by 10.112.234.199 with SMTP id ug7mr8387769lbc.116.1445001565764; Fri, 16 Oct 2015 06:19:25 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id a135si12883543lfe.135.2015.10.16.06.19.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Oct 2015 06:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbpp2 with SMTP id pp2so71913711lbb.0 for ; Fri, 16 Oct 2015 06:19:25 -0700 (PDT) X-Received: by 10.112.129.202 with SMTP id ny10mr8154089lbb.112.1445001565609; Fri, 16 Oct 2015 06:19:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1284187lbq; Fri, 16 Oct 2015 06:19:24 -0700 (PDT) X-Received: by 10.141.28.69 with SMTP id f66mr18753598qhe.67.1445001564341; Fri, 16 Oct 2015 06:19:24 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z66si17832355qhd.20.2015.10.16.06.19.22; Fri, 16 Oct 2015 06:19:24 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id A64DF62C36; Fri, 16 Oct 2015 13:19:22 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 B3DA562C28; Fri, 16 Oct 2015 13:19:14 +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 EE63362C28; Fri, 16 Oct 2015 13:19:07 +0000 (UTC) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by lists.linaro.org (Postfix) with ESMTPS id 80F8162C1E for ; Fri, 16 Oct 2015 13:19:05 +0000 (UTC) Received: by lbcao8 with SMTP id ao8so99915354lbc.3 for ; Fri, 16 Oct 2015 06:19:04 -0700 (PDT) X-Received: by 10.112.62.194 with SMTP id a2mr7414326lbs.80.1445001543717; Fri, 16 Oct 2015 06:19:03 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id p133sm2887172lfp.16.2015.10.16.06.19.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 06:19:03 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Fri, 16 Oct 2015 17:18:17 +0200 Message-Id: <1445008698-8146-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [CHECK-ODP PATCH 1/2] build: build linux-generic with netmap support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christophe.milard@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Netmap got moved into repository ODP and the linux-generic implementation. The odp-netmap repository will be deleted from git.linaro.org/lng/ Modifications needed following the move of netmap in linux-generic. ENABLE_NETMAP is set to one to download and build the netmap code in linux-generic. Note: It does not use the netmap interface, it's as broken as it is today. Thanks to Stuart, who initiated this work. Signed-off-by: Christophe Milard --- apply-and-build.sh | 1 - build-netmap.sh | 14 ++------------ build.sh | 1 + helper/platform/generic | 22 +++++++++++++++++++--- helper/platform/netmap | 35 ----------------------------------- 5 files changed, 22 insertions(+), 51 deletions(-) delete mode 100644 helper/platform/netmap diff --git a/apply-and-build.sh b/apply-and-build.sh index 8083ddd..5dbd346 100755 --- a/apply-and-build.sh +++ b/apply-and-build.sh @@ -53,7 +53,6 @@ fi PLATFORM=${PLATFORM:-linux-generic} [[ ${ENABLE_KS2} -eq 1 ]] && { PLATFORM="linux-keystone2"; ARCH=arm; } -[[ ${ENABLE_NETMAP} -eq 1 ]] && PLATFORM="linux-netmap" [[ ${ENABLE_DPDK} -eq 1 ]] && PLATFORM="linux-dpdk" display_os diff --git a/build-netmap.sh b/build-netmap.sh index 92a6adc..01d6ca4 100755 --- a/build-netmap.sh +++ b/build-netmap.sh @@ -1,16 +1,6 @@ #!/bin/bash -set -e -export PLATFORM=${PLATFORM:-linux-netmap} -export ROOT_DIR=$(readlink -f $(dirname $0)) -source ${ROOT_DIR}/helper/generic -export ODP_BUILDDIR="${ODP_BUILDDIR:-${BUILDDIR}/odp-netmap}" +export ENABLE_NETMAP=1 +./build.sh -${ROOT_DIR}/build.sh "$@" - -if [[ $? -eq 1 ]]; then - exit 1 -else - exit 0 -fi ## vim: set sw=4 sts=4 et foldmethod=syntax : ## diff --git a/build.sh b/build.sh index f3e8322..aba9498 100755 --- a/build.sh +++ b/build.sh @@ -32,6 +32,7 @@ export DISTCHECK="${DISTCHECK:-0}" export DRYRUN="${DRYRUN:-0}" export BUILD_DEPS="${BUILD_DEPS:-1}" export RELOCATE_TEST="${RELOCATE_TEST:-1}" +export ENABLE_NETMAP="${ENABLE_NETMAP:-0}" E_VALGRIND="${E_VALGRIND:-0}" if [[ ! -z ${TEST_LIST} ]]; then export TESTS="${TEST_LIST}" diff --git a/helper/platform/generic b/helper/platform/generic index 8829588..85ddacc 100644 --- a/helper/platform/generic +++ b/helper/platform/generic @@ -1,15 +1,31 @@ [ -n "$GENERIC_PLATFORM_HELPER" ] && return || readonly GENERIC_PLATFORM_HELPER=1 +export NETMAP_SRCDIR=${ROOT_DIR}/netmap + generic_usage() { - : + echo -e "\tENABLE_NETMAP:\t enable build with netmap, default: ${ENABLE_NETMAP}" + echo -e "\tNETMAP_GIT:\t which NETMAP git repo to use" + echo -e "\tNETMAP_REV:\t which NETMAP version to use" } generic_prepare() { export GIT_ODP="${GIT_ODP:-git://git.linaro.org/lng/odp.git}" + if [[ ${ENABLE_NETMAP} -eq 1 ]]; then + export NETMAP_DIR=${NETMAP_SRCDIR} + export CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-netmap-path=${NETMAP_DIR}" + fi } generic_get() { - : + if [[ ${ENABLE_NETMAP} -eq 1 ]]; then + #get netmap so that linux-generic netmap based pktio interfaces can be tested: + NETMAP_GIT=${NETMAP_GIT:-https://code.google.com/p/netmap} + NETMAP_REV=${NETMAP_REV:-7e9e5e7602f5c620ade87b722bed266dd4226031} + git clone ${NETMAP_GIT} ${NETMAP_SRCDIR} + pushd ${NETMAP_SRCDIR} > /dev/null + git reset --hard $NETMAP_REV + popd > /dev/null + fi } generic_build() { @@ -17,7 +33,7 @@ generic_build() { } generic_cleanup() { - : + rm -rf ${NETMAP_SRCDIR} } ## vim: set ft=sh sw=4 sts=4 et foldmethod=syntax : ## diff --git a/helper/platform/netmap b/helper/platform/netmap deleted file mode 100644 index 65b19d1..0000000 --- a/helper/platform/netmap +++ /dev/null @@ -1,35 +0,0 @@ -[ -n "$NETMAP_HELPER" ] && return || readonly NETMAP_HELPER=1 - -export NETMAP_SRCDIR=$ROOT_DIR/netmap - -netmap_get(){ - GIT_NETMAP=${GIT_NETMAP:-https://code.google.com/p/netmap} - NETMAP_REV=${NETMAP_REV:-7e9e5e7602f5c620ade87b722bed266dd4226031} - - git clone ${GIT_NETMAP} ${NETMAP_SRCDIR} - pushd ${NETMAP_SRCDIR} > /dev/null - git reset --hard $NETMAP_REV - popd > /dev/null -} - -netmap_prepare(){ - #configure the build for ODP - export NETMAP_DIR=${NETMAP_SRCDIR} - export CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-sdk-install-path=${NETMAP_DIR}" - export GIT_ODP="${GIT_ODP:-git://git.linaro.org/lng/odp-netmap.git}" -} - -netmap_build() { - : -} - -netmap_cleanup() -{ - rm -rf ${NETMAP_SRCDIR} -} - -netmap_usage() { - echo -e "\tGIT_NETMAP:\t which NETMAP git repo to use" -} - -## vim: set ft=sh sw=4 sts=4 et foldmethod=syntax : ##