DPDK patches and discussions
 help / color / mirror / Atom feed
From: Declan Doherty <declan.doherty@intel.com>
To: Herbert Guan <herbert.guan@arm.com>, dev@dpdk.org, jianbo.liu@linaro.org
Subject: Re: [dpdk-dev] [PATCH] test: Fix memory corruption issues which fails the link_bonding test.
Date: Wed, 12 Jul 2017 10:59:56 +0100	[thread overview]
Message-ID: <ed6d7471-8542-5300-9b7a-5565aef7d3df@intel.com> (raw)
In-Reply-To: <1499671222-8283-1-git-send-email-herbert.guan@arm.com>

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@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;

  parent reply	other threads:[~2017-07-12  9:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10  7:20 Herbert Guan
2017-07-10  7:55 ` Jianbo Liu
2017-07-10 11:13 ` [dpdk-dev] [PATCH v2] " Herbert Guan
2017-07-12 10:23   ` Declan Doherty
2017-07-31 15:25     ` Ferruh Yigit
2017-07-18 16:13   ` Ferruh Yigit
2017-07-19  1:54     ` Herbert Guan
2017-07-12  9:59 ` Declan Doherty [this message]
2017-07-12 10:16   ` [dpdk-dev] [PATCH] " Declan Doherty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed6d7471-8542-5300-9b7a-5565aef7d3df@intel.com \
    --to=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=herbert.guan@arm.com \
    --cc=jianbo.liu@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).