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 663F2902 for ; Tue, 5 Apr 2016 13:00:05 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 05 Apr 2016 04:00:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,443,1455004800"; d="scan'208";a="79319226" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga004.fm.intel.com with ESMTP; 05 Apr 2016 04:00:03 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.13]) by IRSMSX103.ger.corp.intel.com ([169.254.3.239]) with mapi id 14.03.0248.002; Tue, 5 Apr 2016 12:00:02 +0100 From: "De Lara Guarch, Pablo" To: Olivier Matz , "dev@dpdk.org" CC: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v2 4/4] autotest: fix func reentrancy Thread-Index: AQHRjw4CiVWBy6mtNU+aoF9DDIrFS597Nlcg Date: Tue, 5 Apr 2016 11:00:02 +0000 Message-ID: References: <1459351827-3346-1-git-send-email-olivier.matz@6wind.com> <1459841759-23296-1-git-send-email-olivier.matz@6wind.com> <1459841759-23296-5-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1459841759-23296-5-git-send-email-olivier.matz@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjY1MDk3YzQtMmJiMi00MmYzLTg0MTEtNDEzNzJjNzVlZTk3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik5KOGd4Z3pKb2xteE5wZnN5Z3o2c0RnQ3pUSTJpczRLQW5Lak4rb0xOVDQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 4/4] autotest: fix func reentrancy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2016 11:00:05 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier Matz > Sent: Tuesday, April 05, 2016 8:36 AM > To: dev@dpdk.org > Cc: Richardson, Bruce > Subject: [dpdk-dev] [PATCH v2 4/4] autotest: fix func reentrancy >=20 > The previous code in func_reentrancy autotest was doing in parallel > something close to: >=20 > name =3D "common_name"; > do several times { > obj =3D allocate_an_object(name) // obj =3D ring, mempool, hash, = lpm, ... > if (obj =3D=3D NULL && lookup(name) =3D=3D NULL) > return TEST_FAIL; > } >=20 > This code is not safe. For instance: >=20 > mempool_create() is called on core 0, it creates a ring. At the same > time on core 1, mempool_create() is called too and the creation of the > ring fails (EEXIST). But the mempool lookup can fail on core 1 if > the mempool is not added in the list by core 0. >=20 > This commit fixes the func_reentrancy autotest that now works with all > tested class of objects. >=20 > Signed-off-by: Olivier Matz Hi Olivier, Could you include a "Fixes" line here? Thanks, Pablo