[dpdk-dev] [PATCH] autotests: fix mempool element size in func_reentrancy

2016-04-11 Thread Olivier Matz
On 04/11/2016 12:12 PM, Thomas Monjalon wrote: > 2016-04-11 11:33, Olivier Matz: >> --- a/app/test/test_func_reentrancy.c >> +++ b/app/test/test_func_reentrancy.c >> @@ -78,7 +78,7 @@ typedef void (*case_clean_t)(unsigned lcore_id); >> #define MAX_ITER_TIMES (16) >> #define

[dpdk-dev] [PATCH] autotests: fix mempool element size in func_reentrancy

2016-04-11 Thread Thomas Monjalon
2016-04-11 11:33, Olivier Matz: > --- a/app/test/test_func_reentrancy.c > +++ b/app/test/test_func_reentrancy.c > @@ -78,7 +78,7 @@ typedef void (*case_clean_t)(unsigned lcore_id); > #define MAX_ITER_TIMES (16) > #define MAX_LPM_ITER_TIMES (8) > > -#define

[dpdk-dev] [PATCH] autotests: fix mempool element size in func_reentrancy

2016-04-11 Thread Olivier Matz
The mempool element size is set to 0, but 4 bytes are written in my_obj_init(): uint32_t *objnum = obj; memset(obj, 0, mp->elt_size); *objnum = i; Change the MEMPOOL_ELT_SIZE constant to sizeof(uint32_t). This fixes memory corruptions since we were writting outside of the object boundaries.