[lng-odp] [Linaro/odp] 031802: linux-gen: config: improve config file check error...

2018-10-18 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 031802ec0c5e3e44d70aee7b19e0cd1055c9fe0b
  
https://github.com/Linaro/odp/commit/031802ec0c5e3e44d70aee7b19e0cd1055c9fe0b
  Author: Petri Savolainen 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M platform/linux-generic/odp_libconfig.c

  Log Message:
  ---
  linux-gen: config: improve config file check error output

It was hard to notice from log that config file version has
a mismatch. This is a common error when config file version
has updated, but a user has not updated his own config file.
Improve error check output, so that failure reason is better
highlighted.

Signed-off-by: Petri Savolainen 
Signed-off-by: Maxim Uvarov 


  Commit: 7e188187a77fa9bab56f1407eb660c324736cd34
  
https://github.com/Linaro/odp/commit/7e188187a77fa9bab56f1407eb660c324736cd34
  Author: Petri Savolainen 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M platform/linux-generic/include/odp_config_internal.h
M platform/linux-generic/include/odp_schedule_scalable_config.h
M platform/linux-generic/odp_queue_scalable.c

  Log Message:
  ---
  linux-gen: config: move queue size config to scalable

Only scalable queues use build time the queue size config.
Move it to scalable config file.

Signed-off-by: Petri Savolainen 
Signed-off-by: Maxim Uvarov 


  Commit: 2c41f8f678bbb96a63dedb4e4d948c5dd779f65d
  
https://github.com/Linaro/odp/commit/2c41f8f678bbb96a63dedb4e4d948c5dd779f65d
  Author: Petri Savolainen 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M platform/linux-generic/odp_pool.c

  Log Message:
  ---
  linux-gen: pool: output error on pool create

Change from debug to error message on pool create checks.
These are slow path errors and it's helpful to see those
also when not debugging.

Signed-off-by: Petri Savolainen 
Signed-off-by: Maxim Uvarov 


  Commit: 0c8a2c0027e35184cbc6eeadc3a8aa8bd2e8605b
  
https://github.com/Linaro/odp/commit/0c8a2c0027e35184cbc6eeadc3a8aa8bd2e8605b
  Author: Petri Savolainen 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M platform/linux-generic/odp_pool.c

  Log Message:
  ---
  linux-gen: pool: add packet param checks

Do also checks against maximum number of packets and
max packet headroom size.

Signed-off-by: Petri Savolainen 
Signed-off-by: Maxim Uvarov 


  Commit: 95cbee5ac9cdcb696d48e6f820593c813f535f8a
  
https://github.com/Linaro/odp/commit/95cbee5ac9cdcb696d48e6f820593c813f535f8a
  Author: Petri Savolainen 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M config/odp-linux-generic.conf
M platform/linux-generic/include/odp_pool_internal.h
M platform/linux-generic/odp_pool.c
M platform/linux-generic/test/process-mode.conf

  Log Message:
  ---
  linux-gen: pool: add max num packets in config file

This config is used to for maximum capability. The default
capability needs to be modest so that system memory limit is
not exceeded. User may increase maximum number of packets when
system memory size allows (and SHM single VA is not used).

Signed-off-by: Petri Savolainen 
Signed-off-by: Maxim Uvarov 


  Commit: 044cae351a1e60e4381cdbae37e2a759772c2258
  
https://github.com/Linaro/odp/commit/044cae351a1e60e4381cdbae37e2a759772c2258
  Author: Petri Savolainen 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M platform/linux-generic/include/odp_config_internal.h

  Log Message:
  ---
  linux-gen: config: maximum pool size 1M

Change maximum pool size back to 1M. Maximum packet pool
capability is defined in the config file. This is the upper
limit for that config. Also this is max capability of buffer
and tmo pools.

Signed-off-by: Petri Savolainen 
Signed-off-by: Maxim Uvarov 


Compare: https://github.com/Linaro/odp/compare/690bacc61c55...044cae351a1e
  **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

  Functionality will be removed from GitHub.com on January 31st, 2019.


[lng-odp] [Linaro/odp] 690bac: linux-gen: pool: increase minimum packet segment l...

2018-10-18 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 690bacc61c55e4f8f3195faaac068da83790ebf4
  
https://github.com/Linaro/odp/commit/690bacc61c55e4f8f3195faaac068da83790ebf4
  Author: Matias Elo 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M platform/linux-generic/include/odp_config_internal.h
M platform/linux-generic/pktio/dpdk.c

  Log Message:
  ---
  linux-gen: pool: increase minimum packet segment length

Some DPDK NICs need at least 2176 byte buffers (2048B + headroom) to not
segment standard ethernet frames. Increase minimum segment length to avoid
this and add matching check to zero-copy dpdk pktio pool create.

Reported-by: P. Gyanesh Kumar Patra 
Signed-off-by: Matias Elo 
Tested-by: P. Gyanesh Kumar Patra 
Signed-off-by: Maxim Uvarov 



  **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

  Functionality will be removed from GitHub.com on January 31st, 2019.


[lng-odp] [Linaro/odp] f8a9b8: example: generator: use odp_wait_time_ns() instead...

2018-10-18 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: f8a9b873ffd6b1a512eb87ebc3ab183bc71157b0
  
https://github.com/Linaro/odp/commit/f8a9b873ffd6b1a512eb87ebc3ab183bc71157b0
  Author: Matias Elo 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M example/generator/odp_generator.c

  Log Message:
  ---
  example: generator: use odp_wait_time_ns() instead of timers

Simplify code by using odp_wait_time_ns() instead of timers.

Signed-off-by: Matias Elo 
Reviewed-by: Dmitry Eremin-Solenikov 
Signed-off-by: Maxim Uvarov 


  Commit: 0287f1432eda1cf3e7fb8323e0fda838cf744816
  
https://github.com/Linaro/odp/commit/0287f1432eda1cf3e7fb8323e0fda838cf744816
  Author: Matias Elo 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M example/generator/odp_generator.c

  Log Message:
  ---
  example: generator: remove print from packet tx loop

The printf() would flood output when using small tx interval. Increase
global stats print interval instead.

Signed-off-by: Matias Elo 
Reviewed-by: Dmitry Eremin-Solenikov 
Signed-off-by: Maxim Uvarov 


Compare: https://github.com/Linaro/odp/compare/df04f4ccb940...0287f1432eda
  **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

  Functionality will be removed from GitHub.com on January 31st, 2019.


[lng-odp] [Linaro/odp] df04f4: example: stop and close pktio devices on exit

2018-10-18 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: df04f4ccb940fea8cf3d7b5d41e31a381bb0ec08
  
https://github.com/Linaro/odp/commit/df04f4ccb940fea8cf3d7b5d41e31a381bb0ec08
  Author: Matias Elo 
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
M example/ipsec/odp_ipsec.c
M example/ipsec_api/odp_ipsec.c
M example/ipsec_offload/odp_ipsec_offload.c
M example/l2fwd_simple/odp_l2fwd_simple.c
M example/l3fwd/odp_l3fwd.c
M example/switch/odp_switch.c
M platform/linux-generic/test/mmap_vlan_ins/mmap_vlan_ins.c

  Log Message:
  ---
  example: stop and close pktio devices on exit

Stop and close used pktio devices on exit to free used resources.

Signed-off-by: Matias Elo 
Reviewed-by: Dmitry Eremin-Solenikov 
Signed-off-by: Maxim Uvarov 



  **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

  Functionality will be removed from GitHub.com on January 31st, 2019.


Re: [lng-odp] ODP crash at buffer_alloc_multi() while inserting into iplookuptable

2018-10-18 Thread Maxim Uvarov
can you create test case for us?

On Thu, 18 Oct 2018 at 14:55, gyanesh patra 
wrote:

> Hi,
> We are curious if there is any solution in the pipeline for this issue of
> iplookuptable insert, i.e. crash at buffer_alloc_multi() ? Any pointer
> will be really helpful.
> If it will help, we can create an issue in github too.
> Thanks for the help.
>
> Regards,
> P Gyanesh Kumar Patra
>
> On Tue, Sep 11, 2018 at 12:17 PM Maxim Uvarov 
> wrote:
>
>> odp prints happen on places where ODP_DBG("print something") is placed.
>> It's just additional debug information.
>> Also you can increase stack with ulimit -s unlimited and run valgrind to
>> that app. But I generated core on adding to table random values I saw
>> segfault and gdb pointed to that function.
>>
>> Maxim.
>>
>>
>>
>>
>> On 11 September 2018 at 18:03, Fabricio Rodríguez 
>> wrote:
>>
>>> Hi Maxim,
>>>
>>> I have tried the patch that you sent, but the issue continues.
>>>
>>> Also was trying enabling the debug flags at ODP but for some reason, I
>>> can not see any print, you have any suggestion of how to see the ODP debug
>>> prints when using an ODP library from an external application?.
>>>
>>> Regards,
>>>
>>> Fabricio
>>>
>>>
>>> El mar., 11 sept. 2018 a las 10:44, Maxim Uvarov (<
>>> maxim.uva...@linaro.org>) escribió:
>>>
 Gyanesh,

 I tried to add some random data to ip lookup table and found that it
 breaks it's own stack due to recursion.

 I have no idea if it's your case or not. Probably not because you have
 buffer_alloc_multi in stack trace and I do not see that.

 You can test this patch:
 https://github.com/Linaro/odp/pull/700

 Maxim.

 On 10.09.2018 20:01, gyanesh patra wrote:
 > We tried it as:
 > #define ENTRY_NUM_SUBTREE(1 << 12)
 >
 > But it didn't work. We couldn't increase it anymore without adding
 > more RAM to system.
 > One point to consider is that, this same thing was working with ODP
 > 1.16 code, but with ODP 1.19 version it is not working.
 >
 > P Gyanesh Kumar Patra
 >
 >
 > On Mon, Sep 10, 2018 at 12:31 PM Maxim Uvarov <
 maxim.uva...@linaro.org
 > > wrote:
 >
 > did you try to increase?
 >
 > /* The size of one L2\L3 subtree */
 > #define ENTRY_NUM_SUBTREE(1 << 8)
 > ./helper/iplookuptable.c
 >
 > On 10 September 2018 at 18:27, gyanesh patra
 > mailto:pgyanesh.pa...@gmail.com>>
 wrote:
 >
 > We are using ODP library from an external application. hence i
 > dont have a simple test code to reproduce it.
 > But to give a perspective:
 > - the value size as 12
 > - the ip prefix is 32
 > The crash is happening around 159th entry. If the prefix is
 > changed to 16, the crash happens at around 496th entry.
 > Regards,
 > P Gyanesh Kumar Patra
 >
 >
 > On Mon, Sep 10, 2018 at 12:16 PM Maxim Uvarov
 > mailto:maxim.uva...@linaro.org>>
 wrote:
 >
 > do you have some test code to reproduce it?
 >
 > On 10 September 2018 at 18:06, gyanesh patra
 > >>> > > wrote:
 >
 > Hi,
 > ODP is crashing at buffer_alloc_multi() while
 > inserting into iplookuptable.
 >
 > The backtrace is as below: (gdb) bt #0
 buffer_alloc_multi
 > (pool=0x7fffd5420c00,
 > buf_hdr=buf_hdr@entry=0x7fff55fa8bb0,
 > max_num=max_num@entry=1) at odp_pool.c:700 #1
 > 0x00433083 in
 > odp_buffer_alloc (pool_hdl=pool_hdl@entry=0x9) at
 > odp_pool.c:861 #2
 > 0x00703732 in cache_alloc_new_pool
 > (type=CACHE_TYPE_TRIE,
 > tbl=) at iplookuptable.c:223 #3
 > cache_get_buffer
 > (type=CACHE_TYPE_TRIE, tbl=) at
 > iplookuptable.c:248 #4
 > trie_insert_node (nexthop=,
 > cidr=,
 > ip=, root=,
 > tbl=) at
 > iplookuptable.c:317 #5 odph_iplookup_table_put_value
 > (tbl=,
 > key=, value=) at
 > iplookuptable.c:686
 >
 > Am i looking at any limitation to iplookuptable
 > implementaion here? If any
 > other details are needed, please let us know.
 >
 > Regards,
 > P Gyanesh Kumar Patra
 >
 >
 >


>>


Re: [lng-odp] ODP crash at buffer_alloc_multi() while inserting into iplookuptable

2018-10-18 Thread gyanesh patra
Hi,
We are curious if there is any solution in the pipeline for this issue of
iplookuptable insert, i.e. crash at buffer_alloc_multi() ? Any pointer will
be really helpful.
If it will help, we can create an issue in github too.
Thanks for the help.

Regards,
P Gyanesh Kumar Patra

On Tue, Sep 11, 2018 at 12:17 PM Maxim Uvarov 
wrote:

> odp prints happen on places where ODP_DBG("print something") is placed.
> It's just additional debug information.
> Also you can increase stack with ulimit -s unlimited and run valgrind to
> that app. But I generated core on adding to table random values I saw
> segfault and gdb pointed to that function.
>
> Maxim.
>
>
>
>
> On 11 September 2018 at 18:03, Fabricio Rodríguez 
> wrote:
>
>> Hi Maxim,
>>
>> I have tried the patch that you sent, but the issue continues.
>>
>> Also was trying enabling the debug flags at ODP but for some reason, I
>> can not see any print, you have any suggestion of how to see the ODP debug
>> prints when using an ODP library from an external application?.
>>
>> Regards,
>>
>> Fabricio
>>
>>
>> El mar., 11 sept. 2018 a las 10:44, Maxim Uvarov (<
>> maxim.uva...@linaro.org>) escribió:
>>
>>> Gyanesh,
>>>
>>> I tried to add some random data to ip lookup table and found that it
>>> breaks it's own stack due to recursion.
>>>
>>> I have no idea if it's your case or not. Probably not because you have
>>> buffer_alloc_multi in stack trace and I do not see that.
>>>
>>> You can test this patch:
>>> https://github.com/Linaro/odp/pull/700
>>>
>>> Maxim.
>>>
>>> On 10.09.2018 20:01, gyanesh patra wrote:
>>> > We tried it as:
>>> > #define ENTRY_NUM_SUBTREE(1 << 12)
>>> >
>>> > But it didn't work. We couldn't increase it anymore without adding
>>> > more RAM to system.
>>> > One point to consider is that, this same thing was working with ODP
>>> > 1.16 code, but with ODP 1.19 version it is not working.
>>> >
>>> > P Gyanesh Kumar Patra
>>> >
>>> >
>>> > On Mon, Sep 10, 2018 at 12:31 PM Maxim Uvarov >> > > wrote:
>>> >
>>> > did you try to increase?
>>> >
>>> > /* The size of one L2\L3 subtree */
>>> > #define ENTRY_NUM_SUBTREE(1 << 8)
>>> > ./helper/iplookuptable.c
>>> >
>>> > On 10 September 2018 at 18:27, gyanesh patra
>>> > mailto:pgyanesh.pa...@gmail.com>>
>>> wrote:
>>> >
>>> > We are using ODP library from an external application. hence i
>>> > dont have a simple test code to reproduce it.
>>> > But to give a perspective:
>>> > - the value size as 12
>>> > - the ip prefix is 32
>>> > The crash is happening around 159th entry. If the prefix is
>>> > changed to 16, the crash happens at around 496th entry.
>>> > Regards,
>>> > P Gyanesh Kumar Patra
>>> >
>>> >
>>> > On Mon, Sep 10, 2018 at 12:16 PM Maxim Uvarov
>>> > mailto:maxim.uva...@linaro.org>>
>>> wrote:
>>> >
>>> > do you have some test code to reproduce it?
>>> >
>>> > On 10 September 2018 at 18:06, gyanesh patra
>>> > >> > > wrote:
>>> >
>>> > Hi,
>>> > ODP is crashing at buffer_alloc_multi() while
>>> > inserting into iplookuptable.
>>> >
>>> > The backtrace is as below: (gdb) bt #0
>>> buffer_alloc_multi
>>> > (pool=0x7fffd5420c00,
>>> > buf_hdr=buf_hdr@entry=0x7fff55fa8bb0,
>>> > max_num=max_num@entry=1) at odp_pool.c:700 #1
>>> > 0x00433083 in
>>> > odp_buffer_alloc (pool_hdl=pool_hdl@entry=0x9) at
>>> > odp_pool.c:861 #2
>>> > 0x00703732 in cache_alloc_new_pool
>>> > (type=CACHE_TYPE_TRIE,
>>> > tbl=) at iplookuptable.c:223 #3
>>> > cache_get_buffer
>>> > (type=CACHE_TYPE_TRIE, tbl=) at
>>> > iplookuptable.c:248 #4
>>> > trie_insert_node (nexthop=,
>>> > cidr=,
>>> > ip=, root=,
>>> > tbl=) at
>>> > iplookuptable.c:317 #5 odph_iplookup_table_put_value
>>> > (tbl=,
>>> > key=, value=) at
>>> > iplookuptable.c:686
>>> >
>>> > Am i looking at any limitation to iplookuptable
>>> > implementaion here? If any
>>> > other details are needed, please let us know.
>>> >
>>> > Regards,
>>> > P Gyanesh Kumar Patra
>>> >
>>> >
>>> >
>>>
>>>
>


Re: [lng-odp] odp with dpdk pktio gives error with larger packets - 'Segmented buffers not supported'

2018-10-18 Thread gyanesh patra
Hi Matias,
This PR 731 fixed the issue. Thanks a lot.

Regards,
P Gyanesh Kumar Patra


On Thu, Oct 18, 2018 at 4:40 AM Elo, Matias (Nokia - FI/Espoo) <
matias@nokia.com> wrote:

> Thanks! I think I figured out the problem. Some DPDK NICs require that the
> buffer length is at least 2kB + headroom to not segment standard ethernet
> frames. This PR should fix the issue:
> https://github.com/Linaro/odp/pull/731 . Please let me know if this fixed
> your problem.
>
> -Matias
>
>


Re: [lng-odp] Suspected SPAM - Re: odp with dpdk pktio gives error with larger packets - 'Segmented buffers not supported'

2018-10-18 Thread Elo, Matias (Nokia - FI/Espoo)
Thanks! I think I figured out the problem. Some DPDK NICs require that the 
buffer length is at least 2kB + headroom to not segment standard ethernet 
frames. This PR should fix the issue: https://github.com/Linaro/odp/pull/731 . 
Please let me know if this fixed your problem.

-Matias


On 17 Oct 2018, at 10:23, Elo, Matias (Nokia - FI/Espoo) 
mailto:matias@nokia.com>> wrote:

Hi Gyanesh,

Could you please provide some additional information about your system (ODP & 
DPDK versions, NICs)? I’m using DPDK (v17.11.4) zero-copy pktio with the latest 
ODP master branch code and I’m unable to reproduce this issue.

Regards,
Matias

On 16 Oct 2018, at 23:44, gyanesh patra 
mailto:pgyanesh.pa...@gmail.com>> wrote:

Hi Maxim,
Increasing the POOL_SEG_LEN worked. But i am not sure how to calculate the
necessary value to use?
I was using the values from the odp_l2fwd example before. But now i
required to increase it upto 2200 for it to work.
Is there any guideline how to calculate this value? And also does it have
any impact on performance?

Regarding the examples, i tried with odp_l2fwd_simple and odp_switch and
faced the same problem. But in my case "odp_l2fwd" example never recieves
any packets. Hence i have not been able to test that.  If you can give any
input regarding this, it will be helpful too.
Thanks for your help.

Regards,
P Gyanesh Kumar Patra


On Tue, Oct 16, 2018 at 3:36 PM Maxim Uvarov 
mailto:maxim.uva...@linaro.org>>
wrote:

DPDK as ODP can have packets which are not in physacally continius memory.
I.e. packet can be split on several memory segments. That is not supported
by current code and you have this warning. I think that we have dpdk pkio
validation test and it works with large packets. But to do that you need to
be sure that you created pool with right parameters. In your case
POOL_SEG_LEN has to be increased.

Also you can try more featured example: ./test/performance/odp_l2fwd

Best Regards,
Maxim.


On Tue, 16 Oct 2018 at 20:49, gyanesh patra 
mailto:pgyanesh.pa...@gmail.com>>
wrote:

Hi,
I am facing problem while using ODP master branch with DPDK pktio &
zero-pkt-copy as below:

ODP/bin/# ./odp_l2fwd_simple ./odp_l2fwd_simple

pktio/dpdk.c:851:mbuf_to_pkt_zero():Segmented buffers not supported
pktio/dpdk.c:851:mbuf_to_pkt_zero():Segmented buffers not supported
pktio/dpdk.c:851:mbuf_to_pkt_zero():Segmented buffers not supported
pktio/dpdk.c:851:mbuf_to_pkt_zero():Segmented buffers not supported

This error is present for dpdk pktio only. It appears with larger packet
sizes like 1518bytes, 1280bytes. But everything works fine with 1024bytes
and smaller packets.

I have verified that the packets have IP-don't fragment flag set. And
Wireshark doesn't show any abnormality with the pcap.
Is it broken or we need to specify some extra flags?

I am on:
commit 570758a22fd0d6e2b2a73eb8ed0a8360a5b0ef32
Author: Matias Elo mailto:matias@nokia.com>>
Date:   Tue Oct 2 14:13:35 2018 +0300
 linux-gen: ring: allocate global data from shm


Thanks,
P Gyanesh Kumar Patra