diff mbox

[1/1] ODP-DPDK without sdk-install-path

Message ID 1407244768-8475-1-git-send-email-venkatesh.vivekanandan@linaro.org
State New
Headers show

Commit Message

Venkatesh Vivekanandan Aug. 5, 2014, 1:19 p.m. UTC
From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>

- Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
  when sdk-install-path is not specified.
- Updated README with,
	* Steps to compile odp without specifying sdk-install-path,
	  while there give the DESTDIR for DPDK.
	* new commands for odp_l2fwd and pktio
	* cleanup

Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
---
 platform/linux-dpdk/Makefile.am |  3 +++
 platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
 2 files changed, 27 insertions(+), 5 deletions(-)

Comments

Santosh Shukla Aug. 5, 2014, 1:25 p.m. UTC | #1
just now encountered lack of readme improvement problem. Below made
changes looks good to me. Thanks.

On 5 August 2014 18:49,  <venkatesh.vivekanandan@linaro.org> wrote:
> From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
>
> - Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
>   when sdk-install-path is not specified.
> - Updated README with,
>         * Steps to compile odp without specifying sdk-install-path,
>           while there give the DESTDIR for DPDK.
>         * new commands for odp_l2fwd and pktio
>         * cleanup
>
> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> ---
>  platform/linux-dpdk/Makefile.am |  3 +++
>  platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
>  2 files changed, 27 insertions(+), 5 deletions(-)
>
> diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
> index 4aa568f..cd0d591 100644
> --- a/platform/linux-dpdk/Makefile.am
> +++ b/platform/linux-dpdk/Makefile.am
> @@ -16,6 +16,9 @@ PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
>  PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
>
>  AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
> +else
> +PLAT_CFLAGS += -include rte_config.h
> +AM_LDFLAGS  += -L../../lib
>  endif
>
>  AM_CFLAGS +=  $(PLAT_CFLAGS)
> diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> index 14ad4e8..4fc24c1 100644
> --- a/platform/linux-dpdk/README
> +++ b/platform/linux-dpdk/README
> @@ -21,17 +21,30 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
>  # where it was compiled and tested.
>  # Please refer "How to setup and compile DPDK" section in this document
>
> -# To compile ODP with linux-dpdk
> +# TO COMPILE ODP WITH LINUX-DPDK
> +# if user wish to specify --with-sdk-install-path, then execute below cmds
>  $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
> +$ make
> +
> +# if user doesn't wish to specify --with-sdk-install-path, then execute below cmds
> +$ cd <odp-dir>
> +$ ./bootstrap
> +$ ./configure --with-platform=linux-dpdk
> +$ cd <odp-dir>
> +$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
> +$ make
> +# This will fail saying libintel_dpdk.a is not found
> +$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
> +# ./lib directory gets created only during first make
>  $ 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
> +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 +55,14 @@ 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>
> +# if user wish to specify --with-sdk-install-path during odp compilation, execute below cmd
>  $ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
> +# if user doesn't wish to specify --with-sdk-install-path during odp compilation, execute below cmd and a series of steps to be followed during odp compilation
> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
> +# For example
> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
> +
> +# Note: if non-intel SFP's are used in IXGBE, then CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in command line
>
>  # 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 Aug. 6, 2014, 6:33 p.m. UTC | #2
On 2014-08-05 18:49, venkatesh.vivekanandan@linaro.org wrote:
> From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> 
> - Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
>   when sdk-install-path is not specified.
> - Updated README with,
> 	* Steps to compile odp without specifying sdk-install-path,
> 	  while there give the DESTDIR for DPDK.
> 	* new commands for odp_l2fwd and pktio
> 	* cleanup
> 
> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> ---
>  platform/linux-dpdk/Makefile.am |  3 +++
>  platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
>  2 files changed, 27 insertions(+), 5 deletions(-)
> 
> diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
> index 4aa568f..cd0d591 100644
> --- a/platform/linux-dpdk/Makefile.am
> +++ b/platform/linux-dpdk/Makefile.am
> @@ -16,6 +16,9 @@ PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
>  PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
>  
>  AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
> +else
> +PLAT_CFLAGS += -include rte_config.h
> +AM_LDFLAGS  += -L../../lib

can we do something else than ../../ please.

>  endif
>  
>  AM_CFLAGS +=  $(PLAT_CFLAGS)
> diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> index 14ad4e8..4fc24c1 100644
> --- a/platform/linux-dpdk/README
> +++ b/platform/linux-dpdk/README
> @@ -21,17 +21,30 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
>  # where it was compiled and tested.
>  # Please refer "How to setup and compile DPDK" section in this document
>  
> -# To compile ODP with linux-dpdk
> +# TO COMPILE ODP WITH LINUX-DPDK
> +# if user wish to specify --with-sdk-install-path, then execute below cmds
>  $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
> +$ make
> +
> +# if user doesn't wish to specify --with-sdk-install-path, then execute below cmds
> +$ cd <odp-dir>
> +$ ./bootstrap
> +$ ./configure --with-platform=linux-dpdk
> +$ cd <odp-dir>
> +$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
> +$ make
> +# This will fail saying libintel_dpdk.a is not found
> +$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
> +# ./lib directory gets created only during first make

We don't "install" DPDK here we just copy it into odp, can't we install
it to /usr/local/include, /usr/local/lib ?

Cheers,
Anders

>  $ 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
> +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 +55,14 @@ 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>
> +# if user wish to specify --with-sdk-install-path during odp compilation, execute below cmd
>  $ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
> +# if user doesn't wish to specify --with-sdk-install-path during odp compilation, execute below cmd and a series of steps to be followed during odp compilation
> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
> +# For example
> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
> +
> +# Note: if non-intel SFP's are used in IXGBE, then CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in command line
>  
>  # 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 Aug. 6, 2014, 10:16 p.m. UTC | #3
On 2014-08-05 18:49, venkatesh.vivekanandan@linaro.org wrote:
> From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> 
> - Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
>   when sdk-install-path is not specified.
> - Updated README with,
> 	* Steps to compile odp without specifying sdk-install-path,
> 	  while there give the DESTDIR for DPDK.
> 	* new commands for odp_l2fwd and pktio
> 	* cleanup
> 
> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> ---
>  platform/linux-dpdk/Makefile.am |  3 +++
>  platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
>  2 files changed, 27 insertions(+), 5 deletions(-)
> 
> diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
> index 4aa568f..cd0d591 100644
> --- a/platform/linux-dpdk/Makefile.am
> +++ b/platform/linux-dpdk/Makefile.am
> @@ -16,6 +16,9 @@ PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
>  PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
>  
>  AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
> +else
> +PLAT_CFLAGS += -include rte_config.h
> +AM_LDFLAGS  += -L../../lib
>  endif
>  
>  AM_CFLAGS +=  $(PLAT_CFLAGS)
> diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> index 14ad4e8..4fc24c1 100644
> --- a/platform/linux-dpdk/README
> +++ b/platform/linux-dpdk/README
> @@ -21,17 +21,30 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
>  # where it was compiled and tested.
>  # Please refer "How to setup and compile DPDK" section in this document
>  
> -# To compile ODP with linux-dpdk
> +# TO COMPILE ODP WITH LINUX-DPDK
> +# if user wish to specify --with-sdk-install-path, then execute below cmds
>  $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
> +$ make
> +
> +# if user doesn't wish to specify --with-sdk-install-path, then execute below cmds
> +$ cd <odp-dir>
> +$ ./bootstrap
> +$ ./configure --with-platform=linux-dpdk
> +$ cd <odp-dir>
> +$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
> +$ make
> +# This will fail saying libintel_dpdk.a is not found
> +$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
> +# ./lib directory gets created only during first make

Why is this needed when we can specify this with one flag to
configure (--with-sdk-install-path)?
When is it ever needed to build without this flag for linux-dpdk?

Cheers,
Anders

>  $ 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
> +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 +55,14 @@ 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>
> +# if user wish to specify --with-sdk-install-path during odp compilation, execute below cmd
>  $ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
> +# if user doesn't wish to specify --with-sdk-install-path during odp compilation, execute below cmd and a series of steps to be followed during odp compilation
> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
> +# For example
> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
> +
> +# Note: if non-intel SFP's are used in IXGBE, then CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in command line
>  
>  # 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
Venkatesh Vivekanandan Aug. 7, 2014, 6:27 a.m. UTC | #4
On 7 August 2014 00:17, Wiles, Roger Keith <keith.wiles@windriver.com>
wrote:

>  I would suggest using the DPDK environment variables RTE_SDK and
> RTE_TARGET to locate the includes and libs. The user when building DPDK
> should set these two variable anyway if he builds DPDK examples. The
> problem is ‘make install T=x86_64-default-linuxapp-gcc’ does not require
> the variables to be set, but when you try to build an example you do need
> then defined.
>
>  I would add setting of these two in the README.
>
>  export RTE_SDK=<dpdk-dir>
> The dpdk-dir is the location of the DPDK tree.
> export RTE_TARGET=x86_64-default-linuxapp-gcc
> The RTE_TARGET is the configuration you used to build DPDK.
>
>  This way $(RTE_SDK)/$(RTE_TARGET) points to <dpdk-dir>/<target-dir>
>

That's a good point, will include this.

>
>  as in
> /home/keithw/projects/odp_workspace/dpdk/x86_64-default-linuxapp-gcc
>
>
>
> *Keith **Wiles*, Principal Technologist with CTO office, *Wind River*
> mobile 972-213-5533
>
> [image: Powering 30 Years of Innovation]
> <http://www.windriver.com/announces/wr30/>
>
>  On Aug 6, 2014, at 1:33 PM, Anders Roxell <anders.roxell@linaro.org>
> wrote:
>
>  On 2014-08-05 18:49, venkatesh.vivekanandan@linaro.org wrote:
>
> From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
>
> - Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
>  when sdk-install-path is not specified.
> - Updated README with,
> * Steps to compile odp without specifying sdk-install-path,
>   while there give the DESTDIR for DPDK.
> * new commands for odp_l2fwd and pktio
> * cleanup
>
> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> ---
> platform/linux-dpdk/Makefile.am |  3 +++
> platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
> 2 files changed, 27 insertions(+), 5 deletions(-)
>
> diff --git a/platform/linux-dpdk/Makefile.am
> b/platform/linux-dpdk/Makefile.am
> index 4aa568f..cd0d591 100644
> --- a/platform/linux-dpdk/Makefile.am
> +++ b/platform/linux-dpdk/Makefile.am
> @@ -16,6 +16,9 @@ PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
> PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
>
> AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
> +else
> +PLAT_CFLAGS += -include rte_config.h
> +AM_LDFLAGS  += -L../../lib
>
>
> can we do something else than ../../ please.
>
> endif
>
> AM_CFLAGS +=  $(PLAT_CFLAGS)
> diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> index 14ad4e8..4fc24c1 100644
> --- a/platform/linux-dpdk/README
> +++ b/platform/linux-dpdk/README
> @@ -21,17 +21,30 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
> # where it was compiled and tested.
> # Please refer "How to setup and compile DPDK" section in this document
>
> -# To compile ODP with linux-dpdk
> +# TO COMPILE ODP WITH LINUX-DPDK
> +# if user wish to specify --with-sdk-install-path, then execute below cmds
> $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
> +$ make
> +
> +# if user doesn't wish to specify --with-sdk-install-path, then execute
> below cmds
> +$ cd <odp-dir>
> +$ ./bootstrap
> +$ ./configure --with-platform=linux-dpdk
> +$ cd <odp-dir>
> +$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
> +$ make
> +# This will fail saying libintel_dpdk.a is not found
> +$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
> +# ./lib directory gets created only during first make
>
>
> We don't "install" DPDK here we just copy it into odp, can't we install
> it to /usr/local/include, /usr/local/lib ?
>
> Cheers,
> Anders
>
> $ 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
> +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 +55,14 @@ 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>
> +# if user wish to specify --with-sdk-install-path during odp compilation,
> execute below cmd
> $ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
> +# if user doesn't wish to specify --with-sdk-install-path during odp
> compilation, execute below cmd and a series of steps to be followed during
> odp compilation
> +$ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
> +# For example
> +$ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
> +
> +# Note: if non-intel SFP's are used in IXGBE, then
> CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in
> command line
>
> # 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
>
>
>
Venkatesh Vivekanandan Aug. 7, 2014, 6:42 a.m. UTC | #5
On 7 August 2014 00:03, Anders Roxell <anders.roxell@linaro.org> wrote:

> On 2014-08-05 18:49, venkatesh.vivekanandan@linaro.org wrote:
> > From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> >
> > - Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
> >   when sdk-install-path is not specified.
> > - Updated README with,
> >       * Steps to compile odp without specifying sdk-install-path,
> >         while there give the DESTDIR for DPDK.
> >       * new commands for odp_l2fwd and pktio
> >       * cleanup
> >
> > Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org
> >
> > ---
> >  platform/linux-dpdk/Makefile.am |  3 +++
> >  platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
> >  2 files changed, 27 insertions(+), 5 deletions(-)
> >
> > diff --git a/platform/linux-dpdk/Makefile.am
> b/platform/linux-dpdk/Makefile.am
> > index 4aa568f..cd0d591 100644
> > --- a/platform/linux-dpdk/Makefile.am
> > +++ b/platform/linux-dpdk/Makefile.am
> > @@ -16,6 +16,9 @@ PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
> >  PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
> >
> >  AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
> > +else
> > +PLAT_CFLAGS += -include rte_config.h
> > +AM_LDFLAGS  += -L../../lib
>
> can we do something else than ../../ please.
>

Ok. Let me try something else.

>
> >  endif
> >
> >  AM_CFLAGS +=  $(PLAT_CFLAGS)
> > diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> > index 14ad4e8..4fc24c1 100644
> > --- a/platform/linux-dpdk/README
> > +++ b/platform/linux-dpdk/README
> > @@ -21,17 +21,30 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
> >  # where it was compiled and tested.
> >  # Please refer "How to setup and compile DPDK" section in this document
> >
> > -# To compile ODP with linux-dpdk
> > +# TO COMPILE ODP WITH LINUX-DPDK
> > +# if user wish to specify --with-sdk-install-path, then execute below
> cmds
> >  $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
> > +$ make
> > +
> > +# if user doesn't wish to specify --with-sdk-install-path, then execute
> below cmds
> > +$ cd <odp-dir>
> > +$ ./bootstrap
> > +$ ./configure --with-platform=linux-dpdk
> > +$ cd <odp-dir>
> > +$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
> > +$ make
> > +# This will fail saying libintel_dpdk.a is not found
> > +$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
> > +# ./lib directory gets created only during first make
>
> We don't "install" DPDK here we just copy it into odp, can't we install
> it to /usr/local/include, /usr/local/lib ?
>

Will try that.


>
> Cheers,
> Anders
>
> >  $ 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
> > +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 +55,14 @@ 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>
> > +# if user wish to specify --with-sdk-install-path during odp
> compilation, execute below cmd
> >  $ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
> > +# if user doesn't wish to specify --with-sdk-install-path during odp
> compilation, execute below cmd and a series of steps to be followed during
> odp compilation
> > +$ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
> > +# For example
> > +$ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
> > +
> > +# Note: if non-intel SFP's are used in IXGBE, then
> CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in
> command line
> >
> >  # 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
>
Venkatesh Vivekanandan Aug. 7, 2014, 6:56 a.m. UTC | #6
On 7 August 2014 03:46, Anders Roxell <anders.roxell@linaro.org> wrote:

> On 2014-08-05 18:49, venkatesh.vivekanandan@linaro.org wrote:
> > From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> >
> > - Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
> >   when sdk-install-path is not specified.
> > - Updated README with,
> >       * Steps to compile odp without specifying sdk-install-path,
> >         while there give the DESTDIR for DPDK.
> >       * new commands for odp_l2fwd and pktio
> >       * cleanup
> >
> > Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org
> >
> > ---
> >  platform/linux-dpdk/Makefile.am |  3 +++
> >  platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
> >  2 files changed, 27 insertions(+), 5 deletions(-)
> >
> > diff --git a/platform/linux-dpdk/Makefile.am
> b/platform/linux-dpdk/Makefile.am
> > index 4aa568f..cd0d591 100644
> > --- a/platform/linux-dpdk/Makefile.am
> > +++ b/platform/linux-dpdk/Makefile.am
> > @@ -16,6 +16,9 @@ PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
> >  PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
> >
> >  AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
> > +else
> > +PLAT_CFLAGS += -include rte_config.h
> > +AM_LDFLAGS  += -L../../lib
> >  endif
> >
> >  AM_CFLAGS +=  $(PLAT_CFLAGS)
> > diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> > index 14ad4e8..4fc24c1 100644
> > --- a/platform/linux-dpdk/README
> > +++ b/platform/linux-dpdk/README
> > @@ -21,17 +21,30 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
> >  # where it was compiled and tested.
> >  # Please refer "How to setup and compile DPDK" section in this document
> >
> > -# To compile ODP with linux-dpdk
> > +# TO COMPILE ODP WITH LINUX-DPDK
> > +# if user wish to specify --with-sdk-install-path, then execute below
> cmds
> >  $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
> > +$ make
> > +
> > +# if user doesn't wish to specify --with-sdk-install-path, then execute
> below cmds
> > +$ cd <odp-dir>
> > +$ ./bootstrap
> > +$ ./configure --with-platform=linux-dpdk
> > +$ cd <odp-dir>
> > +$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
> > +$ make
> > +# This will fail saying libintel_dpdk.a is not found
> > +$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
> > +# ./lib directory gets created only during first make
>
> Why is this needed when we can specify this with one flag to
> configure (--with-sdk-install-path)?
> When is it ever needed to build without this flag for linux-dpdk?
>

As we were discussing on what if --with-sdk-install-path isn't specified?.
Probably for now we will leave it at that, user must specify
--with-sdk-install-path.


>
> Cheers,
> Anders
>
> >  $ 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
> > +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 +55,14 @@ 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>
> > +# if user wish to specify --with-sdk-install-path during odp
> compilation, execute below cmd
> >  $ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
> > +# if user doesn't wish to specify --with-sdk-install-path during odp
> compilation, execute below cmd and a series of steps to be followed during
> odp compilation
> > +$ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
> > +# For example
> > +$ make install T=x86_64-default-linuxapp-gcc
> CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
> > +
> > +# Note: if non-intel SFP's are used in IXGBE, then
> CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in
> command line
> >
> >  # 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
>
Maxim Uvarov Aug. 7, 2014, 7:05 a.m. UTC | #7
On 08/07/2014 02:16 AM, Anders Roxell wrote:
> On 2014-08-05 18:49, venkatesh.vivekanandan@linaro.org wrote:
>> From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
>>
>> - Updated Makefile.am with necessary PLAT_CFLAGS and AM_LDFLAGS
>>    when sdk-install-path is not specified.
>> - Updated README with,
>> 	* Steps to compile odp without specifying sdk-install-path,
>> 	  while there give the DESTDIR for DPDK.
>> 	* new commands for odp_l2fwd and pktio
>> 	* cleanup
>>
>> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
>> ---
>>   platform/linux-dpdk/Makefile.am |  3 +++
>>   platform/linux-dpdk/README      | 29 ++++++++++++++++++++++++-----
>>   2 files changed, 27 insertions(+), 5 deletions(-)
>>
>> diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
>> index 4aa568f..cd0d591 100644
>> --- a/platform/linux-dpdk/Makefile.am
>> +++ b/platform/linux-dpdk/Makefile.am
>> @@ -16,6 +16,9 @@ PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
>>   PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
>>   
>>   AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
>> +else
>> +PLAT_CFLAGS += -include rte_config.h
>> +AM_LDFLAGS  += -L../../lib
>>   endif
>>   
>>   AM_CFLAGS +=  $(PLAT_CFLAGS)
>> diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
>> index 14ad4e8..4fc24c1 100644
>> --- a/platform/linux-dpdk/README
>> +++ b/platform/linux-dpdk/README
>> @@ -21,17 +21,30 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
>>   # where it was compiled and tested.
>>   # Please refer "How to setup and compile DPDK" section in this document
>>   
>> -# To compile ODP with linux-dpdk
>> +# TO COMPILE ODP WITH LINUX-DPDK
>> +# if user wish to specify --with-sdk-install-path, then execute below cmds
>>   $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
>> +$ make
>> +
>> +# if user doesn't wish to specify --with-sdk-install-path, then execute below cmds
>> +$ cd <odp-dir>
>> +$ ./bootstrap
>> +$ ./configure --with-platform=linux-dpdk
>> +$ cd <odp-dir>
>> +$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
>> +$ make
>> +# This will fail saying libintel_dpdk.a is not found
>> +$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
>> +# ./lib directory gets created only during first make
> Why is this needed when we can specify this with one flag to
> configure (--with-sdk-install-path)?
> When is it ever needed to build without this flag for linux-dpdk?
>
> Cheers,
> Anders
I compiled with that steps:
DPDK:
/opt/..dpdk.git/build
make EXTRA_CFLAGS="-fPIC"

ODP:
./bootstrap
./configure --with-platform=linux-dpdk 
--with-sdk-install-path=/opt/.../dpdk.git/build/
make

Should we also need to add that by default DPDK should be with -fPIC?

Also I agree with Anders, that it's better to remove comments about hack 
without "--with-sdk-install-path=".
If there is no "--with-sdk-install-path="  odp expects that everything 
is in standard directory. I.e. /usr/include,
/usr/lib. And there are might be number of ways to workaround that 
build. Like adding extra CFLAGS/LDFLAGS
to configure or make. Lets just skip that block.

Best regards,
Maxim.

>>   $ 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
>> +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 +55,14 @@ 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>
>> +# if user wish to specify --with-sdk-install-path during odp compilation, execute below cmd
>>   $ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
>> +# if user doesn't wish to specify --with-sdk-install-path during odp compilation, execute below cmd and a series of steps to be followed during odp compilation
>> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
>> +# For example
>> +$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
>> +
>> +# Note: if non-intel SFP's are used in IXGBE, then CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in command line
>>   
>>   # 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
diff mbox

Patch

diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index 4aa568f..cd0d591 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -16,6 +16,9 @@  PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
 PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
 
 AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/lib
+else
+PLAT_CFLAGS += -include rte_config.h
+AM_LDFLAGS  += -L../../lib
 endif
 
 AM_CFLAGS +=  $(PLAT_CFLAGS)
diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
index 14ad4e8..4fc24c1 100644
--- a/platform/linux-dpdk/README
+++ b/platform/linux-dpdk/README
@@ -21,17 +21,30 @@  $ git checkout -b 1.6.0 tags/v1.6.0r2
 # where it was compiled and tested.
 # Please refer "How to setup and compile DPDK" section in this document
 
-# To compile ODP with linux-dpdk
+# TO COMPILE ODP WITH LINUX-DPDK
+# if user wish to specify --with-sdk-install-path, then execute below cmds
 $ 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=/root/dpdk/x86_64-default-linuxapp-gcc
+$ make
+
+# if user doesn't wish to specify --with-sdk-install-path, then execute below cmds
+$ cd <odp-dir>
+$ ./bootstrap
+$ ./configure --with-platform=linux-dpdk
+$ cd <odp-dir>
+$ cp -r x86_64-default-linuxapp-gcc/include/* ./include/
+$ make
+# This will fail saying libintel_dpdk.a is not found
+$ cp x86_64-default-linuxapp-gcc/lib/libintel_dpdk.a ./lib/.
+# ./lib directory gets created only during first make
 $ 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
+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 +55,14 @@  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>
+# if user wish to specify --with-sdk-install-path during odp compilation, execute below cmd
 $ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
+# if user doesn't wish to specify --with-sdk-install-path during odp compilation, execute below cmd and a series of steps to be followed during odp compilation
+$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=<odp-dir>
+# For example
+$ make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" DESTDIR=/root/odp
+
+# Note: if non-intel SFP's are used in IXGBE, then CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y has to be specified in command line
 
 # If "conflicting types for skb_set_hash" error happens during dpdk
 # build, then please knock-off skb_set_hash function from kcompat.h as