From patchwork Tue Aug 12 13:45:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 35261 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F361C20540 for ; Tue, 12 Aug 2014 13:45:38 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id vb8sf43961241obc.4 for ; Tue, 12 Aug 2014 06:45:38 -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:from:to:date:message-id :mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=uZwjxVFxoxdhqZoJQhLX9Qn5WRiiLiQAd95T1BRT5aE=; b=DcHd/MoxceSE0XTomP4T7a2rXQHP4Sn1LflP2b+3sCsBS5rvqMFTx6RyyfM03QgyJy OP6Zf1y3js+So/VNrOd1xaIbj2T+aeyyUMjF4M5qMaauI/ljzBXVwh43tWTHTLn3B70i Qek9BMbQjrDUBjFe6AyUcDti3LkVIx5TRDB/BonlE7Yih//ig0wOhFWg5ZDQD+gJMJRO jkW//HFbRuxr4SQI/Y0CIrwDR+d9FRz2CIK/MYwYNbziGneFLp97bT+7kyvHxB5OJkJz kcg4YrgU/L6hUf5/xiR9z/DxF3upRDnSWFn1e+z05i9kKe5M804WQCyQr3qRk3TIPXfL WSmA== X-Gm-Message-State: ALoCoQm7yIQCMR6b6Y+azpEsydf+F/I5n8l9mCPKZ7onOBLqAr1VT330JFt7rTOIgXzZ5GrYjvdi X-Received: by 10.182.66.234 with SMTP id i10mr2412452obt.12.1407851138637; Tue, 12 Aug 2014 06:45:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.235 with SMTP id q98ls131796qga.91.gmail; Tue, 12 Aug 2014 06:45:38 -0700 (PDT) X-Received: by 10.220.196.147 with SMTP id eg19mr692280vcb.60.1407851138407; Tue, 12 Aug 2014 06:45:38 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id o2si8224946vdb.104.2014.08.12.06.45.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:45:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so13319691vcb.16 for ; Tue, 12 Aug 2014 06:45:38 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr3816372vdb.27.1407851138320; Tue, 12 Aug 2014 06:45:38 -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.221.37.5 with SMTP id tc5csp250171vcb; Tue, 12 Aug 2014 06:45:37 -0700 (PDT) X-Received: by 10.229.191.2 with SMTP id dk2mr6778237qcb.8.1407851137551; Tue, 12 Aug 2014 06:45:37 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 81si25750587qgx.26.2014.08.12.06.45.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:45:37 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XHCON-0005yz-Ce; Tue, 12 Aug 2014 13:45:35 +0000 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XHCOH-0005yt-Li for lng-odp@lists.linaro.org; Tue, 12 Aug 2014 13:45:29 +0000 X-IronPort-AV: E=Sophos;i="5.01,849,1400050800"; d="scan'208";a="42063635" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw3-out.broadcom.com with ESMTP; 12 Aug 2014 06:58:25 -0700 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 12 Aug 2014 06:45:18 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.3.174.1; Tue, 12 Aug 2014 06:45:18 -0700 Received: from localhost.localdomain (unknown [10.131.61.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id ED8779F9FF; Tue, 12 Aug 2014 06:45:10 -0700 (PDT) From: To: Date: Tue, 12 Aug 2014 19:15:07 +0530 Message-ID: <1407851107-4565-1-git-send-email-venkatesh.vivekanandan@linaro.org> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-Topics: patch Subject: [lng-odp] [PATCHv4] Updated ODP-DPDK README X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkatesh.vivekanandan@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.220.171 as permitted sender) smtp.mail=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 From: Venkatesh Vivekanandan - export RTE_SDK and RTE_TARGET before compiling ODP - new commands for odp_l2fwd and pktio - cleanup Signed-off-by: Venkatesh Vivekanandan Reviewed-by: Anders Roxell --- platform/linux-dpdk/README | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README index 14ad4e8..0f2210b 100644 --- a/platform/linux-dpdk/README +++ b/platform/linux-dpdk/README @@ -5,7 +5,7 @@ SPDX-License-Identifier: BSD-3-Clause ODP-DPDK: --------- - This effort is to port ODP on top of DPDK and use dpdk as the + This effort is to port ODP on top of DPDK and use DPDK as the accelerator for all intel NIC's. Pre-requisite is DPDK should be cloned and compiled. DPDK and ODP was compiled and tested on Ubuntu 14.04 3.13.0-29-generic kernel. @@ -13,25 +13,31 @@ compiled. DPDK and ODP was compiled and tested on Ubuntu 14.04 # To Clone DPDK $ git clone http://92.243.14.124/git/dpdk ./ -# we support only 1.6.0r2 of dpdk for now +# we support only 1.6.0r2 of DPDK for now $ git tag -l -- will list all the tags available $ git checkout -b 1.6.0 tags/v1.6.0r2 -# Please refer dpdk.org website for more details on how to build dpdk. -# Best effort is done to provide some help on dpdk cmds below for Ubuntu, +# Please refer to http://dpdk.org/doc for more details on how to build +# DPDK. Getting started guide for Linux might be of help. +# Best effort is done to provide some help on DPDK cmds below for Ubuntu, # where it was compiled and tested. # Please refer "How to setup and compile DPDK" section in this document # To compile ODP with linux-dpdk + +$ export RTE_SDK= +# For example +$ export RTE_SDK=/root/dpdk +$ export RTE_TARGET=x86_64-default-linuxapp-gcc +# RTE_TARGET is the configuration used while building DPDK + $ cd $ ./bootstrap -$ ./configure --with-platform=linux-dpdk --with-sdk-install-path= -# For example -$ ./configure --with-platform=linux-dpdk --with-sdk-install-path=/root/dpdk/build +$ ./configure --with-platform=linux-dpdk --with-sdk-install-path=$RTE_SDK/$RTE_TARGET $ make -# Commands to test -l2fwding app - sudo ./test/l2fwd/odp_l2fwd -i 0,1 -m 0 -c 2 -loopback app - sudo ./test/packet/odp_pktio -i 0,1 -m 0 -c 2 +# App commands to test +l2fwding app - sudo ./example/l2fwd/odp_l2fwd -i 0,1 -m 0 -c 2 +loopback app - sudo ./example/packet/odp_pktio -i 0,1 -m 0 -c 2 -i 0,1 - interface number -m 0 - burst mode @@ -42,10 +48,13 @@ How to setup and compile DPDK: $ cd # This has to be done only once. -# Following command will generate build dir as ./build in -$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" +$ make config T=x86_64-default-linuxapp-gcc O=x86_64-default-linuxapp-gcc +# set CONFIG_RTE_BUILD_COMBINE_LIBS=y in .config file +# Note: if non-intel SFP's are used in IXGBE, then set CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y in .config file +$ make install T=x86_64-default-linuxapp-gcc EXTRA_CFLAGS="-fPIC" + -# If "conflicting types for skb_set_hash" error happens during dpdk +# If "conflicting types for skb_set_hash" error happens during DPDK # build, then please knock-off skb_set_hash function from kcompat.h as # shown below. This was seen in Ubuntu 3.13.0-30-generic. diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -63,10 +72,10 @@ index 19df483..78a794a 100644 -} #endif /* NETIF_F_RXHASH */ #endif /* < 3.14.0 */ -# this only ensures building dpdk, but traffic is not tested with this +# this only ensures building DPDK, but traffic is not tested with this # build yet. It is upto the user to test it. -# To reserve huge pages, which is needed for dpdk, execute following command +# To reserve huge pages, which is needed for DPDK, execute following command $ sudo sh -c 'echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages' # If you are running on a multi-node machine then, hugepages should be reserved on each node $ ls /sys/devices/system/node @@ -108,7 +117,7 @@ Other network devices # Now you should look for pci id listed and give it in the following command # in place of 05:00.X -# To give the interfaces to dpdk, use following command +# To give the interfaces to DPDK, use following command $ sudo ./tools/igb_uio_bind.py --bind=igb_uio 05:00.0 $ sudo ./tools/igb_uio_bind.py --bind=igb_uio 05:00.1 # To restore it back to kernel, use following command