[dpdk-dev] [PATCH] test: Fix memory corruption issues which fails the link_bonding test.
Declan Doherty
declan.doherty at intel.com
Wed Jul 12 11:59:56 CEST 2017
On 10/07/2017 8:20 AM, Herbert Guan wrote:
> There were double-free problems in some test cases of link_bonding,
> which will cause a duplicated mbuf will be added into mempool. After
> double-free, some new allocated mbuf will hold a same address and
> thus cause the memory corruption.
>
> Another minor issue is that in some test cases, allocated mbuf will
> not be released after test case exits. Hopefully these leaked mbuf
> will be released by the next test case in its setup phase when
> stopping the virtual pmd ports, while this do is a memory leak of
> the exited test case.
>
> To fix above 2 issues, this patch will do:
> 1) Release virtual pmd ports' tx queue in the clean up function
> remove_slaves_and_stop_bonded_device() of each test cases.
> 2) Do not release allocated mbufs for test bursts. These mbufs
> will be released in remove_slaves_and_stop_bonded_device() when
> test case exits.
>
> Signed-off-by: Herbert Guan <herbert.guan at arm.com>
> ---
...
>
Hey Herbert,
I'm seeing compilation warnings for unused variables when I apply this
patch, otherwise these changes look good.
CC test_link_bonding.o
/home/declan/Development/dpdk-org/master/test/test/test_link_bonding.c:2407:9:
error: unused variable 'j'
[-Werror,-Wunused-variable]
int i, j, burst_size, slave_count, primary_port;
^
/home/declan/Development/dpdk-org/master/test/test/test_link_bonding.c:3301:9:
error: unused variable 'j'
[-Werror,-Wunused-variable]
int i, j, burst_size, slave_count;
^
/home/declan/Development/dpdk-org/master/test/test/test_link_bonding.c:3860:9:
error: unused variable 'j'
[-Werror,-Wunused-variable]
int i, j, burst_size, slave_count;
^
/home/declan/Development/dpdk-org/master/test/test/test_link_bonding.c:4372:9:
error: unused variable 'j'
[-Werror,-Wunused-variable]
int i, j, burst_size, slave_count, primary_port;
More information about the dev
mailing list