Can you please compile ODP with debug:
 ./configure --enable-debug --enable-debug-print
--enable-helper-debug-print CFLAGS="-O0"

Do you run on x86?

It looks like prefix_insert_into_lx() a little bit buggy and there might be
recursion forever. Ret is defined as uint8, has to be int. e->cidr does not
use upper bit of uint8_t, so it's in range of 0 to 127, but range is not
validated. Upper function does not test for error return.

Also if you are saying that it worked on 1.16 then 'git bissect' can point
to exact commit which broke it.
The only commit which touched this file is:
commit 5a4502fc6bc53e6503169da3028f456b64811a0b
Author: Ilias Apalodimas <ilias.apalodi...@linaro.org>
Date:   Tue Jan 16 21:09:35 2018 +0200

    linux-gen: align: Fix alignment for typedef definitions

        * typedef struct { } ODP_ALIGN() test_t; is correct
        * typedef struct ODP_ALIGN() {} test_t; is correct and
        preferred from gcc standards
        * typedef struct {} test_t ODP_ALIGN() discards align
        Had segfauls on gcc-7 using that

    Signed-off-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>
    Reviewed-by: Bill Fischofer <bill.fischo...@linaro.org>
    Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>

Maxim.

On 10 September 2018 at 20:01, gyanesh patra <pgyanesh.pa...@gmail.com>
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 <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 <maxim.uva...@linaro.org>
>>> wrote:
>>>
>>>> do you have some test code to reproduce it?
>>>>
>>>> On 10 September 2018 at 18:06, gyanesh patra <pgyanesh.pa...@gmail.com>
>>>> 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 0x0000000000433083 in
>>>>> odp_buffer_alloc (pool_hdl=pool_hdl@entry=0x9) at odp_pool.c:861 #2
>>>>> 0x0000000000703732 in cache_alloc_new_pool (type=CACHE_TYPE_TRIE,
>>>>> tbl=<optimized out>) at iplookuptable.c:223 #3 cache_get_buffer
>>>>> (type=CACHE_TYPE_TRIE, tbl=<optimized out>) at iplookuptable.c:248 #4
>>>>> trie_insert_node (nexthop=<optimized out>, cidr=<optimized out>,
>>>>> ip=<optimized out>, root=<optimized out>, tbl=<optimized out>) at
>>>>> iplookuptable.c:317 #5 odph_iplookup_table_put_value (tbl=<optimized
>>>>> out>,
>>>>> key=<optimized out>, value=<optimized out>) 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
>>>>>
>>>>
>>>>
>>

Reply via email to