From patchwork Thu Aug 7 21:16:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 35069 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8B53A21137 for ; Thu, 7 Aug 2014 21:16:53 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id h18sf170943igc.5 for ; Thu, 07 Aug 2014 14:16:53 -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:date:from:to:message-id:references :mime-version:in-reply-to:user-agent:cc: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-disposition :content-type:content-transfer-encoding; bh=ZdJuIbjlrW3/x/IojaOmK0YLu4+UjO4rVMLdTSjO46Q=; b=m2yAxlhnRqOBNB2vQWzcpG/AF6PTj5r4mM54pSU3hkax3n0ZEPM07lRtBuXkusTMw4 ngAqbEofNAuhM6YIjsvKT3bFNT2U5QfoV+Tl/ZgyIzZBSHeiqG41ukala5KaK7e3rYTF 34pfb+i78Q6l6mlQmKBHxM6h52JJODGkTJiAyyeULjyX6ZlvIzto9INkkLVmF5VPAnKk ZcLMkMGq+WuCH0VoHpBxxxf6KsM1WpnOT4/zOzsAe4oSFVSZIgJD9p5e2KWYSOWKhRcU yut58OSevQYdcdN4k9Vx4Fa4ZEM934DXDfuWaF+khhzqCI9EVPS5STYdTGD1vlseDuap 72zA== X-Gm-Message-State: ALoCoQkjcvxogCuOPr86h8k66hGJzBZL6dHxdN8MZ80B9pELAhqrEEfCqzTQfTjXQiFbubHU9moq X-Received: by 10.43.64.202 with SMTP id xj10mr2817069icb.0.1407446213082; Thu, 07 Aug 2014 14:16:53 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.235 with SMTP id q98ls275300qga.91.gmail; Thu, 07 Aug 2014 14:16:52 -0700 (PDT) X-Received: by 10.221.59.194 with SMTP id wp2mr2768995vcb.59.1407446212955; Thu, 07 Aug 2014 14:16:52 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id z8si2208045vdz.102.2014.08.07.14.16.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Aug 2014 14:16:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so7265029vcb.27 for ; Thu, 07 Aug 2014 14:16:52 -0700 (PDT) X-Received: by 10.220.182.73 with SMTP id cb9mr18484823vcb.9.1407446212831; Thu, 07 Aug 2014 14:16:52 -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 tc5csp60479vcb; Thu, 7 Aug 2014 14:16:52 -0700 (PDT) X-Received: by 10.224.136.70 with SMTP id q6mr31848405qat.14.1407446211865; Thu, 07 Aug 2014 14:16:51 -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 v17si7856664qav.51.2014.08.07.14.16.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 Aug 2014 14:16:51 -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 1XFV3H-0002BX-Q9; Thu, 07 Aug 2014 21:16:47 +0000 Received: from mail-la0-f42.google.com ([209.85.215.42]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XFV3B-0002BN-J2 for lng-odp@lists.linaro.org; Thu, 07 Aug 2014 21:16:41 +0000 Received: by mail-la0-f42.google.com with SMTP id pv20so3994089lab.1 for ; Thu, 07 Aug 2014 14:16:35 -0700 (PDT) X-Received: by 10.152.115.242 with SMTP id jr18mr5854274lab.26.1407446195328; Thu, 07 Aug 2014 14:16:35 -0700 (PDT) Received: from 8470w (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id q8sm464641laj.33.2014.08.07.14.16.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 07 Aug 2014 14:16:34 -0700 (PDT) Date: Thu, 7 Aug 2014 23:16:30 +0200 From: Anders Roxell To: "Wiles, Roger Keith" Message-ID: <20140807211630.GA8489@8470w> References: <1407406581-10935-1-git-send-email-venkatesh.vivekanandan@linaro.org> <20140807155048.GB23561@8470w> <2B65EA9F-CF51-4C57-A47D-4704678568FE@windriver.com> <20140807190933.GA10848@8470w> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Topics: patch Cc: "lng-odp@lists.linaro.org" Subject: Re: [lng-odp] [PATCH 1/1] ODP-DPDK README update 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: anders.roxell@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.182 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 Content-Disposition: inline On 2014-08-07 19:20, Wiles, Roger Keith wrote: > BTW, I added these two lines to configure.ac file to help include the variables. > > AC_SUBST([rte_sdk], $RTE_SDK) > AC_SUBST([rte_target], $RTE_TARGET) > > I do not know how to require these two variables from the linux-dpdk and force a error or warning. 1. Would it be enough with something like this to enforce using --with-sdk-install-path if you specify --with-patform=linux-dpdk ? Becuse, this is the ODP exected way to point to SDKs that isn't installed in a default path. $ git show commit 5ab94b1f54c2ed3a9a2bc9a7cfed871785b517a6 Author: Anders Roxell Date: Thu Aug 7 22:50:56 2014 +0200 configure.ac: enforce --with-sdk-install-path if linux-dpdk Signed-off-by: Anders Roxell 2. Venkatesh patch is alright if we just swap these lines, like this: # set CONFIG_RTE_BUILD_COMBINE_LIBS=y in .config file $ make install T=x86_64-default-linuxapp-gcc EXTRA_CFLAGS="-fPIC" And add a link to the DPDKs README file. > > Then in one of my Makefile.am files I did the following. > > noinst_LIBRARIES = libcommon.a > libcommon_a_SOURCES = wr_cksum.c wr_copyright_info.c wr_core_info.c wr_coremap.c wr_l2p.c \ > wr_lscpu.c wr_mempool.c wr_pcap.c wr_port_config.c wr_utils.c > libcommon_a_CPPFLAGS = -I${rte_sdk}/${rte_target}/include -I${srcdir}/../scrn -I${srcdir}/../lua > > BTW, if you can suggest another way for -I$(srcdir)/../scrn it would be great. I'm assuming you are in platform/linux-dpdk/Makefile.am Can you do anything like this: -I$(top_srcdir)/platform/scrn Cheers, Anders > > Thanks > ++Keith > > Keith Wiles, Principal Technologist with CTO office, Wind River > mobile 972-213-5533 > > [Powering 30 Years of Innovation] > > On Aug 7, 2014, at 2:09 PM, Anders Roxell > wrote: > > On 2014-08-07 18:42, Wiles, Roger Keith wrote: > Export the RTE_SDK/RTE_TARGET is a requirement for DPDK to build example directory or external applications to locate the includes/libs. When doing a ‘make install T=…’ they assume and build the two variables internally to that build only. Also you can ‘cd’ into x86_64-default-linuxapp-gcc and just type make as they know all of the values already. They did not force you to export the variables, but it does help to make sure you are building with the correct includes/libs. You can have multiple configuration directories in a single DPDK tree as long as you define the correct RTE_TARGET you can build the correct one. > > Argh, if I remember correctly you mentioned this earlier as well! > Thank you for clarifying this again. > > Cheers, > Anders > > > Keith Wiles, Principal Technologist with CTO office, Wind River > mobile 972-213-5533 > > [Powering 30 Years of Innovation] > > On Aug 7, 2014, at 10:50 AM, Anders Roxell > wrote: > > On 2014-08-07 15:46, venkatesh.vivekanandan@linaro.org wrote: > 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 > > --- > platform/linux-dpdk/README | 23 +++++++++++++++-------- > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README > index 14ad4e8..da9891c 100644 > --- a/platform/linux-dpdk/README > +++ b/platform/linux-dpdk/README > @@ -22,16 +22,21 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2 > # 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 > > I'm not convinced that this is easier than it was before... The only > time its easier is if you build dpdk from the same shell then you don't > need to export RTE_SDK and RTE_TARGET... Because you have to do that > when you build dpdk right? > > > -# 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,8 +47,10 @@ 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 install T=x86_64-default-linuxapp-gcc EXTRA_CFLAGS="-fPIC" > +# set CONFIG_RTE_BUILD_COMBINE_LIBS=y in .config file > > Why is it better to split this up on two lines? > If its better to split it up on two lines: > Why do I want to change .config after I've done make install? > > +# Note: if non-intel SFP's are used in IXGBE, then set CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y in .config file > > I think this information can be good. > Maybe we should point out DPDKs README if there is one as well... > > + > > Not needed > > > Cheers, > Anders > > > # If "conflicting types for skb_set_hash" error happens during dpdk > # build, then please knock-off skb_set_hash function from kcompat.h as > -- > 1.8.1.2 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp > > -- > Anders Roxell > anders.roxell@linaro.org > M: +46 709 71 42 85 | IRC: roxell > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp > > > -- > Anders Roxell > anders.roxell@linaro.org > M: +46 709 71 42 85 | IRC: roxell > diff --git a/configure.ac b/configure.ac index 6b75e66..3fc36ca 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,11 @@ AC_SUBST(SDK_INSTALL_PATH) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) +if test ! ${SDK_INSTALL_PATH_} && test "x${with_platform}" = "xlinux-dpdk" ; then + echo "ERROR: You need to specify --with-sdk-install-path" + exit -1 +fi + ########################################################################## # Enable/disable netmap support ##########################################################################