From patchwork Thu Mar 24 10:31:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 64296 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp547184lbc; Thu, 24 Mar 2016 03:32:31 -0700 (PDT) X-Received: by 10.140.92.120 with SMTP id a111mr9438386qge.39.1458815551566; Thu, 24 Mar 2016 03:32:31 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h70si5981816qge.46.2016.03.24.03.32.31; Thu, 24 Mar 2016 03:32:31 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4105F618CE; Thu, 24 Mar 2016 10:32:31 +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 BEA8B61828; Thu, 24 Mar 2016 10:32:03 +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 F25CF61865; Thu, 24 Mar 2016 10:31:35 +0000 (UTC) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by lists.linaro.org (Postfix) with ESMTPS id B159161828 for ; Thu, 24 Mar 2016 10:31:32 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id d82so30934077lfe.3 for ; Thu, 24 Mar 2016 03:31:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GPq1+SodW5gxgIXpwnSVWuQG11EtTPLwwl3zNbcHpso=; b=brzhCNjzH36AyMaNemmEptHFdQ2QhHyqvZQX8yePEQGPysheN2vJ7ox6G/BJcJ1Via D4WV19beTWavPG8LhwBcjaYi3LzmAtQ90FlPpZHqsgsuiCZ+pjEcuS2mqu1nZEH/EB66 YdTKecS5GVb6VHEg1IHk4q9B0+Vg44SU0M8mn7LPEpdqUvyuGCr3UvXuAja/a+d2eqhf efRxoWDFr/3ouKORrdF0P3L98AoZ8M84doQr+cPTQZ/coVvrhVyqH8GxgLrzsBWTDAw/ HIZ8FSe270Cp8SarItpC+c+ZxcOJCJpTfY6WmXl307lycKeKI82VCUYNY4XMka74VPzI 3M/A== X-Gm-Message-State: AD7BkJLupD53JjgkeX5DTXZDRnpk+BYmRJBtl4vGk9m8Abm08JjnkxzOO0fKCgILxuSw+ZgWK1Q= X-Received: by 10.25.142.213 with SMTP id q204mr2433117lfd.149.1458815491597; Thu, 24 Mar 2016 03:31:31 -0700 (PDT) Received: from localhost.localdomain (ppp91-77-172-79.pppoe.mtu-net.ru. [91.77.172.79]) by smtp.gmail.com with ESMTPSA id i9sm1064263lfe.31.2016.03.24.03.31.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Mar 2016 03:31:30 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 24 Mar 2016 13:31:26 +0300 Message-Id: <1458815487-8076-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 In-Reply-To: <1458815487-8076-1-git-send-email-maxim.uvarov@linaro.org> References: <1458815487-8076-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv4 1/2] scripts: add builddpdk 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Add script to quickly build odp with dpdk pktio support. Signed-off-by: Maxim Uvarov --- .gitignore | 1 + scripts/build-pktio-dpdk | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 scripts/build-pktio-dpdk diff --git a/.gitignore b/.gitignore index b4c146b..4945d25 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ core cscope.out depcomp doc/output +dpdk/ install-sh lib/ libtool diff --git a/scripts/build-pktio-dpdk b/scripts/build-pktio-dpdk new file mode 100755 index 0000000..81d5411 --- /dev/null +++ b/scripts/build-pktio-dpdk @@ -0,0 +1,34 @@ +#!/bin/bash + +TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"} + +export ROOT_DIR=$(readlink -e $(dirname $0) | sed 's|/scripts||') +pushd ${ROOT_DIR} + +echo '#include "pcap.h"' | cpp -H -o /dev/null 2>&1 +if [ "$?" != "0" ]; then + echo "Error: pcap is not installed. You may need to install libpcap-dev" +fi + +git clone http://dpdk.org/git/dpdk dpdk +pushd dpdk +git checkout -b bv2.2.0 v2.2.0 + +#Make and edit DPDK configuration +make config T=${TARGET} O=${TARGET} +pushd x86_64-native-linuxapp-gcc +sed -ri 's,(CONFIG_RTE_BUILD_COMBINE_LIBS=).*,\1y,' .config +#To use I/O without DPDK supported NIC's enable pcap pmd: +sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config +popd + +#Build DPDK +make install T=${TARGET} EXTRA_CFLAGS="-fPIC" +popd + +#Build ODP +./bootstrap; +./configure --enable-test-vald --enable-test-perf --enable-test-cpp \ + --enable-debug --enable-debug-print \ + --with-dpdk-path=`pwd`/dpdk/${TARGET} +make