From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id DE7172E83 for ; Wed, 12 Jul 2017 11:59:58 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2017 02:59:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,349,1496127600"; d="scan'208";a="126172252" Received: from dwdohert-mobl1.ger.corp.intel.com (HELO [163.33.228.219]) ([163.33.228.219]) by fmsmga006.fm.intel.com with ESMTP; 12 Jul 2017 02:59:57 -0700 To: Herbert Guan , dev@dpdk.org, jianbo.liu@linaro.org References: <1499671222-8283-1-git-send-email-herbert.guan@arm.com> From: Declan Doherty Message-ID: Date: Wed, 12 Jul 2017 10:59:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1499671222-8283-1-git-send-email-herbert.guan@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] test: Fix memory corruption issues which fails the link_bonding test. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2017 09:59:59 -0000 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 > --- ... > 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;