diff mbox

[1/1] ODP-DPDK README update

Message ID 20140807211630.GA8489@8470w
State New
Headers show

Commit Message

Anders Roxell Aug. 7, 2014, 9:16 p.m. UTC
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 <anders.roxell@linaro.org>
Date:   Thu Aug 7 22:50:56 2014 +0200

    configure.ac: enforce --with-sdk-install-path if linux-dpdk
    
    Signed-off-by: Anders Roxell <anders.roxell@linaro.org>



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]<http://www.windriver.com/announces/wr30/>
> 
> On Aug 7, 2014, at 2:09 PM, Anders Roxell <anders.roxell@linaro.org<mailto:anders.roxell@linaro.org>> 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]<http://www.windriver.com/announces/wr30/>
> 
> On Aug 7, 2014, at 10:50 AM, Anders Roxell <anders.roxell@linaro.org<mailto:anders.roxell@linaro.org><mailto:anders.roxell@linaro.org>> wrote:
> 
> On 2014-08-07 15:46, venkatesh.vivekanandan@linaro.org<mailto:venkatesh.vivekanandan@linaro.org><mailto:venkatesh.vivekanandan@linaro.org> wrote:
> From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org<mailto:venkatesh.vivekanandan@linaro.org><mailto:venkatesh.vivekanandan@linaro.org>>
> 
> - export RTE_SDK and RTE_TARGET before compiling ODP
> - new commands for odp_l2fwd and pktio
> - cleanup
> 
> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org<mailto:venkatesh.vivekanandan@linaro.org><mailto:venkatesh.vivekanandan@linaro.org>>
> ---
> 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=<dpdk-dir>
> +# 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 <odp-dir>
> $ ./bootstrap
> -$ ./configure --with-platform=linux-dpdk --with-sdk-install-path=<dpdk-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 <dpdk-dir>
> 
> # This has to be done only once.
> -# Following command will generate build dir as ./build in <dpdk-dir>
> -$ 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<mailto:lng-odp@lists.linaro.org><mailto:lng-odp@lists.linaro.org>
> http://lists.linaro.org/mailman/listinfo/lng-odp
> 
> --
> Anders Roxell
> anders.roxell@linaro.org<mailto:anders.roxell@linaro.org>
> M: +46 709 71 42 85 | IRC: roxell
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org<mailto:lng-odp@lists.linaro.org>
> http://lists.linaro.org/mailman/listinfo/lng-odp
> 
> 
> --
> Anders Roxell
> anders.roxell@linaro.org<mailto:anders.roxell@linaro.org>
> M: +46 709 71 42 85 | IRC: roxell
>

Comments

Venkatesh Vivekanandan Aug. 8, 2014, 6:01 a.m. UTC | #1
On 8 August 2014 02:46, Anders Roxell <anders.roxell@linaro.org> wrote:

> 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 <anders.roxell@linaro.org>
> Date:   Thu Aug 7 22:50:56 2014 +0200
>
>     configure.ac: enforce --with-sdk-install-path if linux-dpdk
>
>     Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>
> 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
>  ##########################################################################
>
>
> 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"
>

only after make install,  "x86_64-default-linuxapp-gcc" directory gets
created and .config is part of this directory. I will send out a patch
using make config in first place to create the directory and then edit
.config file, oherwise swapping these two lines is not possible.

>
> And add a link to the DPDKs README file.
>

Let me add getting started guide link for DPDK.


>
> > 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]<
> http://www.windriver.com/announces/wr30/>
> >
> > On Aug 7, 2014, at 2:09 PM, Anders Roxell <anders.roxell@linaro.org
> <mailto:anders.roxell@linaro.org>> 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]<
> http://www.windriver.com/announces/wr30/>
> >
> > On Aug 7, 2014, at 10:50 AM, Anders Roxell <anders.roxell@linaro.org
> <mailto:anders.roxell@linaro.org><mailto:anders.roxell@linaro.org>> wrote:
> >
> > On 2014-08-07 15:46, venkatesh.vivekanandan@linaro.org<mailto:
> venkatesh.vivekanandan@linaro.org><mailto:
> venkatesh.vivekanandan@linaro.org> wrote:
> > From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org<mailto:
> venkatesh.vivekanandan@linaro.org><mailto:
> venkatesh.vivekanandan@linaro.org>>
> >
> > - export RTE_SDK and RTE_TARGET before compiling ODP
> > - new commands for odp_l2fwd and pktio
> > - cleanup
> >
> > Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org
> <mailto:venkatesh.vivekanandan@linaro.org><mailto:
> venkatesh.vivekanandan@linaro.org>>
> > ---
> > 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=<dpdk-dir>
> > +# 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 <odp-dir>
> > $ ./bootstrap
> > -$ ./configure --with-platform=linux-dpdk
> --with-sdk-install-path=<dpdk-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 <dpdk-dir>
> >
> > # This has to be done only once.
> > -# Following command will generate build dir as ./build in <dpdk-dir>
> > -$ 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<mailto:lng-odp@lists.linaro.org><mailto:
> lng-odp@lists.linaro.org>
> > http://lists.linaro.org/mailman/listinfo/lng-odp
> >
> > --
> > Anders Roxell
> > anders.roxell@linaro.org<mailto:anders.roxell@linaro.org>
> > M: +46 709 71 42 85 | IRC: roxell
> >
> > _______________________________________________
> > lng-odp mailing list
> > lng-odp@lists.linaro.org<mailto:lng-odp@lists.linaro.org>
> > http://lists.linaro.org/mailman/listinfo/lng-odp
> >
> >
> > --
> > Anders Roxell
> > anders.roxell@linaro.org<mailto:anders.roxell@linaro.org>
> > M: +46 709 71 42 85 | IRC: roxell
> >
>
> --
> Anders Roxell
> anders.roxell@linaro.org
> M: +46 709 71 42 85 | IRC: roxell
>
diff mbox

Patch

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
 ##########################################################################