[PATCHv3,1/2] scripts: add builddpdk

Message ID 1458544605-1930-1-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov March 21, 2016, 7:16 a.m.
Add script to quickly build odp with dpdk pktio support.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 .gitignore               |  1 +
 scripts/build-pktio-dpdk | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100755 scripts/build-pktio-dpdk

Comments

Mike Holmes March 23, 2016, 4:44 p.m. | #1
We need to note that you must run that script from the root of ODP and not
in the scripts dir, I tried that and it failed  to find ./bootstrap

When I do run from the root dir I get the following

make[2]: Entering directory '/home/mike/git/odp/test/performance'
  CCLD     odp_crypto
../../lib/.libs/libodp.a(io_ops.o):(.rodata+0x8): undefined reference to
`pcap_pktio_ops'
collect2: error: ld returned 1 exit status
Makefile:704: recipe for target 'odp_crypto' failed
make[2]: *** [odp_crypto] Error 1
make[2]: Leaving directory '/home/mike/git/odp/test/performance'
Makefile:412: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/mike/git/odp/test'
Makefile:464: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


However the  dependencies don't list anything  about pcap to run this
script, should the script test for pcap support ?

3.4.1 Building DPDK and ODP with DPDK pktio support

   DPDK packet I/O has been tested to work with DPDK v2.2.0.

   Follow steps in ./scripts/build-pktio-dpdk




On 21 March 2016 at 03:16, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> Add script to quickly build odp with dpdk pktio support.

>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

> ---

>  .gitignore               |  1 +

>  scripts/build-pktio-dpdk | 26 ++++++++++++++++++++++++++

>  2 files changed, 27 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..bcc00b0

> --- /dev/null

> +++ b/scripts/build-pktio-dpdk

> @@ -0,0 +1,26 @@

> +#!/bin/bash

> +

> +TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}

> +

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

> --

> 2.7.1.250.gff4ea60

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>




-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Mike Holmes March 23, 2016, 6:30 p.m. | #2
On 23 March 2016 at 13:22, Nikolay Nikolaev <
n.nikolaev@virtualopensystems.com> wrote:

>

>

> On Wed, Mar 23, 2016 at 6:44 PM, Mike Holmes <mike.holmes@linaro.org>

> wrote:

>

>> We need to note that you must run that script from the root of ODP and

>> not in the scripts dir, I tried that and it failed  to find ./bootstrap

>>

>> When I do run from the root dir I get the following

>>

>> make[2]: Entering directory '/home/mike/git/odp/test/performance'

>>   CCLD     odp_crypto

>> ../../lib/.libs/libodp.a(io_ops.o):(.rodata+0x8): undefined reference to

>> `pcap_pktio_ops'

>> collect2: error: ld returned 1 exit status

>> Makefile:704: recipe for target 'odp_crypto' failed

>> make[2]: *** [odp_crypto] Error 1

>> make[2]: Leaving directory '/home/mike/git/odp/test/performance'

>> Makefile:412: recipe for target 'all-recursive' failed

>> make[1]: *** [all-recursive] Error 1

>> make[1]: Leaving directory '/home/mike/git/odp/test'

>> Makefile:464: recipe for target 'all-recursive' failed

>> make: *** [all-recursive] Error 1

>>

>>

>> However the  dependencies don't list anything  about pcap to run this

>> script, should the script test for pcap support ?

>>

> From personal experience it might be worth download and compile a static

> pcap library, but maybe that is too much for this script.

>


I can't get this to fail the same way now, I think it may have been damaged
by running the script from the script dir first possibly ?


>

> regards,

> Nikolay Nikolaev

>

>>

>> 3.4.1 Building DPDK and ODP with DPDK pktio support

>>

>>    DPDK packet I/O has been tested to work with DPDK v2.2.0.

>>

>>    Follow steps in ./scripts/build-pktio-dpdk

>>

>>

>>

>>

>> On 21 March 2016 at 03:16, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>

>>> Add script to quickly build odp with dpdk pktio support.

>>>

>>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>> ---

>>>  .gitignore               |  1 +

>>>  scripts/build-pktio-dpdk | 26 ++++++++++++++++++++++++++

>>>  2 files changed, 27 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..bcc00b0

>>> --- /dev/null

>>> +++ b/scripts/build-pktio-dpdk

>>> @@ -0,0 +1,26 @@

>>> +#!/bin/bash

>>> +

>>> +TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}

>>> +

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

>>> --

>>> 2.7.1.250.gff4ea60

>>>

>>> _______________________________________________

>>> lng-odp mailing list

>>> lng-odp@lists.linaro.org

>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>

>>

>>

>>

>> --

>> Mike Holmes

>> Technical Manager - Linaro Networking Group

>> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs

>> "Work should be fun and collaborative, the rest follows"

>>

>>

>>

>> _______________________________________________

>> lng-odp mailing list

>> lng-odp@lists.linaro.org

>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>

>>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Mike Holmes March 23, 2016, 6:39 p.m. | #3
On 23 March 2016 at 14:30, Mike Holmes <mike.holmes@linaro.org> wrote:

>

>

> On 23 March 2016 at 13:22, Nikolay Nikolaev <

> n.nikolaev@virtualopensystems.com> wrote:

>

>>

>>

>> On Wed, Mar 23, 2016 at 6:44 PM, Mike Holmes <mike.holmes@linaro.org>

>> wrote:

>>

>>> We need to note that you must run that script from the root of ODP and

>>> not in the scripts dir, I tried that and it failed  to find ./bootstrap

>>>

>>> When I do run from the root dir I get the following

>>>

>>> make[2]: Entering directory '/home/mike/git/odp/test/performance'

>>>   CCLD     odp_crypto

>>> ../../lib/.libs/libodp.a(io_ops.o):(.rodata+0x8): undefined reference to

>>> `pcap_pktio_ops'

>>> collect2: error: ld returned 1 exit status

>>> Makefile:704: recipe for target 'odp_crypto' failed

>>> make[2]: *** [odp_crypto] Error 1

>>> make[2]: Leaving directory '/home/mike/git/odp/test/performance'

>>> Makefile:412: recipe for target 'all-recursive' failed

>>> make[1]: *** [all-recursive] Error 1

>>> make[1]: Leaving directory '/home/mike/git/odp/test'

>>> Makefile:464: recipe for target 'all-recursive' failed

>>> make: *** [all-recursive] Error 1

>>>

>>>

>>> However the  dependencies don't list anything  about pcap to run this

>>> script, should the script test for pcap support ?

>>>

>> From personal experience it might be worth download and compile a static

>> pcap library, but maybe that is too much for this script.

>>

>

> I can't get this to fail the same way now, I think it may have been

> damaged by running the script from the script dir first possibly ?

>

>

>>

>> regards,

>> Nikolay Nikolaev

>>

>>>

>>> 3.4.1 Building DPDK and ODP with DPDK pktio support

>>>

>>>    DPDK packet I/O has been tested to work with DPDK v2.2.0.

>>>

>>>    Follow steps in ./scripts/build-pktio-dpdk

>>>

>>>

>>>

>>>

>>> On 21 March 2016 at 03:16, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>

>>>> Add script to quickly build odp with dpdk pktio support.

>>>>

>>>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>>> ---

>>>>  .gitignore               |  1 +

>>>>  scripts/build-pktio-dpdk | 26 ++++++++++++++++++++++++++

>>>>  2 files changed, 27 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..bcc00b0

>>>> --- /dev/null

>>>> +++ b/scripts/build-pktio-dpdk

>>>> @@ -0,0 +1,26 @@

>>>> +#!/bin/bash

>>>> +

>>>> +TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}

>>>> +

>>>> +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}

>>>>

>>>

Opps

./configure --help
...
  --with-netmap-path=DIR   path to netmap root directory
                          (or in the default path if not specified).
  --with-dpdk-path=DIR   path to dpdk build directory
                          (or in the default path if not specified).
  --with-sdk-install-path=DIR path to external libs and headers
                          (or in the default path if not specified).
...

I think that we meant to use with-sdk-install-path every time and drop
with-dpdk-path, with-netmap-path



> +make

>>>> --

>>>> 2.7.1.250.gff4ea60

>>>>

>>>> _______________________________________________

>>>> lng-odp mailing list

>>>> lng-odp@lists.linaro.org

>>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>>

>>>

>>>

>>>

>>> --

>>> Mike Holmes

>>> Technical Manager - Linaro Networking Group

>>> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM

>>> SoCs

>>> "Work should be fun and collaborative, the rest follows"

>>>

>>>

>>>

>>> _______________________________________________

>>> lng-odp mailing list

>>> lng-odp@lists.linaro.org

>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>

>>>

>>

>

>

> --

> Mike Holmes

> Technical Manager - Linaro Networking Group

> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs

> "Work should be fun and collaborative, the rest follows"

>

>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Maxim Uvarov March 23, 2016, 7:10 p.m. | #4
On 03/23/16 21:39, Mike Holmes wrote:
>
>
> On 23 March 2016 at 14:30, Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>> wrote:
>
>
>
>     On 23 March 2016 at 13:22, Nikolay Nikolaev
>     <n.nikolaev@virtualopensystems.com
>     <mailto:n.nikolaev@virtualopensystems.com>> wrote:
>
>
>
>         On Wed, Mar 23, 2016 at 6:44 PM, Mike Holmes
>         <mike.holmes@linaro.org <mailto:mike.holmes@linaro.org>> wrote:
>
>             We need to note that you must run that script from the
>             root of ODP and not in the scripts dir, I tried that and
>             it failed  to find ./bootstrap
>
>             When I do run from the root dir I get the following
>
>             make[2]: Entering directory
>             '/home/mike/git/odp/test/performance'
>               CCLD     odp_crypto
>             ../../lib/.libs/libodp.a(io_ops.o):(.rodata+0x8):
>             undefined reference to `pcap_pktio_ops'
>             collect2: error: ld returned 1 exit status
>             Makefile:704: recipe for target 'odp_crypto' failed
>             make[2]: *** [odp_crypto] Error 1
>             make[2]: Leaving directory
>             '/home/mike/git/odp/test/performance'
>             Makefile:412: recipe for target 'all-recursive' failed
>             make[1]: *** [all-recursive] Error 1
>             make[1]: Leaving directory '/home/mike/git/odp/test'
>             Makefile:464: recipe for target 'all-recursive' failed
>             make: *** [all-recursive] Error 1
>
>
>             However the  dependencies don't list anything  about pcap
>             to run this script, should the script test for pcap support ?
>
>         From personal experience it might be worth download and
>         compile a static pcap library, but maybe that is too much for
>         this script.
>
>
>     I can't get this to fail the same way now, I think it may have
>     been damaged by running the script from the script dir first
>     possibly ?
>
>
>         regards,
>         Nikolay Nikolaev
>
>
>             3.4.1 Building DPDK and ODP with DPDK pktio support
>
>                DPDK packet I/O has been tested to work with DPDK v2.2.0.
>
>                Follow steps in ./scripts/build-pktio-dpdk
>
>
>
>
>             On 21 March 2016 at 03:16, Maxim Uvarov
>             <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>>
>             wrote:
>
>                 Add script to quickly build odp with dpdk pktio support.
>
>                 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org
>                 <mailto:maxim.uvarov@linaro.org>>
>                 ---
>                  .gitignore      |  1 +
>                  scripts/build-pktio-dpdk | 26 ++++++++++++++++++++++++++
>                  2 files changed, 27 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..bcc00b0
>                 --- /dev/null
>                 +++ b/scripts/build-pktio-dpdk
>                 @@ -0,0 +1,26 @@
>                 +#!/bin/bash
>                 +
>                 +TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
>                 +
>                 +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}
>
>
> Opps
>
> ./configure --help
> ...
>   --with-netmap-path=DIR   path to netmap root directory
>                           (or in the default path if not specified).
>   --with-dpdk-path=DIR   path to dpdk build directory
>                           (or in the default path if not specified).
>   --with-sdk-install-path=DIR path to external libs and headers
>                           (or in the default path if not specified).
> ...
>
> I think that we meant to use with-sdk-install-path every time and drop 
> with-dpdk-path, with-netmap-path
>

for odp-dpdk or other platform.

For linux-generic it's different types if pktio. You can enable both 
netmap and dpdk.

Maxim.


>                 +make
>                 --
>                 2.7.1.250.gff4ea60
>
>                 _______________________________________________
>                 lng-odp mailing list
>                 lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>                 https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
>             -- 
>             Mike Holmes
>             Technical Manager - Linaro Networking Group
>             Linaro.org <http://www.linaro.org/>***│ *Open source
>             software for ARM SoCs
>             "Work should be fun and collaborative, the rest follows"
>
>
>             _______________________________________________
>             lng-odp mailing list
>             lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>             https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
>
>     -- 
>     Mike Holmes
>     Technical Manager - Linaro Networking Group
>     Linaro.org <http://www.linaro.org/>***│ *Open source software for
>     ARM SoCs
>     "Work should be fun and collaborative, the rest follows"
>
>
>
>
> -- 
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
Mike Holmes March 24, 2016, 12:27 p.m. | #5
On 23 March 2016 at 15:10, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> On 03/23/16 21:39, Mike Holmes wrote:

>

>>

>>

>> On 23 March 2016 at 14:30, Mike Holmes <mike.holmes@linaro.org <mailto:

>> mike.holmes@linaro.org>> wrote:

>>

>>

>>

>>     On 23 March 2016 at 13:22, Nikolay Nikolaev

>>     <n.nikolaev@virtualopensystems.com

>>     <mailto:n.nikolaev@virtualopensystems.com>> wrote:

>>

>>

>>

>>         On Wed, Mar 23, 2016 at 6:44 PM, Mike Holmes

>>         <mike.holmes@linaro.org <mailto:mike.holmes@linaro.org>> wrote:

>>

>>             We need to note that you must run that script from the

>>             root of ODP and not in the scripts dir, I tried that and

>>             it failed  to find ./bootstrap

>>

>>             When I do run from the root dir I get the following

>>

>>             make[2]: Entering directory

>>             '/home/mike/git/odp/test/performance'

>>               CCLD     odp_crypto

>>             ../../lib/.libs/libodp.a(io_ops.o):(.rodata+0x8):

>>             undefined reference to `pcap_pktio_ops'

>>             collect2: error: ld returned 1 exit status

>>             Makefile:704: recipe for target 'odp_crypto' failed

>>             make[2]: *** [odp_crypto] Error 1

>>             make[2]: Leaving directory

>>             '/home/mike/git/odp/test/performance'

>>             Makefile:412: recipe for target 'all-recursive' failed

>>             make[1]: *** [all-recursive] Error 1

>>             make[1]: Leaving directory '/home/mike/git/odp/test'

>>             Makefile:464: recipe for target 'all-recursive' failed

>>             make: *** [all-recursive] Error 1

>>

>>

>>             However the  dependencies don't list anything  about pcap

>>             to run this script, should the script test for pcap support ?

>>

>>         From personal experience it might be worth download and

>>         compile a static pcap library, but maybe that is too much for

>>         this script.

>>

>>

>>     I can't get this to fail the same way now, I think it may have

>>     been damaged by running the script from the script dir first

>>     possibly ?

>>

>>

>>         regards,

>>         Nikolay Nikolaev

>>

>>

>>             3.4.1 Building DPDK and ODP with DPDK pktio support

>>

>>                DPDK packet I/O has been tested to work with DPDK v2.2.0.

>>

>>                Follow steps in ./scripts/build-pktio-dpdk

>>

>>

>>

>>

>>             On 21 March 2016 at 03:16, Maxim Uvarov

>>             <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>>

>>             wrote:

>>

>>                 Add script to quickly build odp with dpdk pktio support.

>>

>>                 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org

>>                 <mailto:maxim.uvarov@linaro.org>>

>>

>>                 ---

>>                  .gitignore      |  1 +

>>                  scripts/build-pktio-dpdk | 26 ++++++++++++++++++++++++++

>>                  2 files changed, 27 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..bcc00b0

>>                 --- /dev/null

>>                 +++ b/scripts/build-pktio-dpdk

>>                 @@ -0,0 +1,26 @@

>>                 +#!/bin/bash

>>                 +

>>                 +TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}

>>                 +

>>                 +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}

>>

>>

>> Opps

>>

>> ./configure --help

>> ...

>>   --with-netmap-path=DIR   path to netmap root directory

>>                           (or in the default path if not specified).

>>   --with-dpdk-path=DIR   path to dpdk build directory

>>                           (or in the default path if not specified).

>>   --with-sdk-install-path=DIR path to external libs and headers

>>                           (or in the default path if not specified).

>> ...

>>

>> I think that we meant to use with-sdk-install-path every time and drop

>> with-dpdk-path, with-netmap-path

>>

>>

> for odp-dpdk or other platform.

>

> For linux-generic it's different types if pktio. You can enable both

> netmap and dpdk.

>


Is that really a use case that exists ?

Netmap serves a subset of the NICs DPDK supports and I dont think there is
a Netmap NIC that DPDK doe not support ?

I dont think you will ever use these in parallel, Petri you have experience
here, what have you found ?

Mike



>

> Maxim.

>

>

>                 +make

>>                 --

>>                 2.7.1.250.gff4ea60

>>

>>                 _______________________________________________

>>                 lng-odp mailing list

>>                 lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org

>> >

>>                 https://lists.linaro.org/mailman/listinfo/lng-odp

>>

>>

>>

>>

>>             --             Mike Holmes

>>             Technical Manager - Linaro Networking Group

>>             Linaro.org <http://www.linaro.org/>***│ *Open source

>>             software for ARM SoCs

>>             "Work should be fun and collaborative, the rest follows"

>>

>>

>>             _______________________________________________

>>             lng-odp mailing list

>>             lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>

>>             https://lists.linaro.org/mailman/listinfo/lng-odp

>>

>>

>>

>>

>>

>>     --     Mike Holmes

>>     Technical Manager - Linaro Networking Group

>>     Linaro.org <http://www.linaro.org/>***│ *Open source software for

>>     ARM SoCs

>>     "Work should be fun and collaborative, the rest follows"

>>

>>

>>

>>

>> --

>> Mike Holmes

>> Technical Manager - Linaro Networking Group

>> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM

>> SoCs

>> "Work should be fun and collaborative, the rest follows"

>>

>>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Mike Holmes March 24, 2016, 4:34 p.m. | #6
>

> SNIP

>>>

>> .......


>                 ---

>>>                  .gitignore      |  1 +

>>>                  scripts/build-pktio-dpdk | 26 ++++++++++++++++++++++++++

>>>                  2 files changed, 27 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..bcc00b0

>>>                 --- /dev/null

>>>                 +++ b/scripts/build-pktio-dpdk

>>>                 @@ -0,0 +1,26 @@

>>>                 +#!/bin/bash

>>>                 +

>>>                 +TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}

>>>

>>

Need to use $ARCH or similar for building on ARM


>                 +

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

>>>

>>

https://projects.linaro.org/browse/ODP-312 has been fixed and ODP-DPDK
should build on AARch64 so this path will not make sence on a non X86 - as
suggested by Anders we should make this be $TARGET


>                 +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}

>>> s a Netmap NIC that DPDK doe not support ?

>>>

>>

> .........


> SNIP

>

Patch

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..bcc00b0
--- /dev/null
+++ b/scripts/build-pktio-dpdk
@@ -0,0 +1,26 @@ 
+#!/bin/bash
+
+TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
+
+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