From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9066A04E1 for ; Wed, 27 Nov 2019 15:16:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A27E528EE; Wed, 27 Nov 2019 15:16:20 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0C39228EE; Wed, 27 Nov 2019 15:16:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2019 06:16:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,249,1571727600"; d="scan'208";a="211770133" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 27 Nov 2019 06:16:17 -0800 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 Nov 2019 06:16:17 -0800 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 Nov 2019 06:16:16 -0800 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (104.47.49.51) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 Nov 2019 06:16:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O07GqRfQCeF9zUtr5ZcLavSCeG0A0v0BMPd1a5zYDauOpPs8eOdMft3SGXYt1qZGT53/szbN70Vbk0gFOok3r+AnVa2C3xc7ymfxAIFCvGVpAvWP7YTsCA9Y20tntjc2f3WnGjY3yT7u0ScrmTnKMy9y3E7SgA4Io8RAoLPhMOkvvUctnO0V8O2cx1+60J13oiPNz54oDrjQXXcJ/5Uk2gFca3pWSF3PEEjC4VQqbU3TsdHSb7o06giqkw2hD0L/MOwVIAolht9KUQb2hh72or8IBm313cL4/Zevv+cxwB8Oe0satbHEEMKKTA8iLQbhb1bBgDNlEca95EjT88BZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j/eu9ORmO5qhq952WkxBSUUb5o/njuHnhAd/Kje7z9c=; b=lEuW8cQ5RTHc3QfpjIjCygsfgbQkviP40JuuxYxMxLvEKOlyly3R4wHWIimza/JehL95wKAfreMxFGw3seEZbITA4dprzTDroHugPZ+x128zv0+Y8FwiQmOWBEjMNV4fWvzZp2c2dQ9Oz5rdFPUbuyFPYnnJXTF8woIrGijnd8hfjs+AVs/GCvUFaJlMt6PxvhbYA1WHyLoW63MJQL1Ebx/fHgWCTgtnc9AwknOyGU4O9uBfddokjnKCuNWuKTFmt+7FWT1eE09YH5WdZOGOh6pIn5E4VYmne21U4EFcrB9EQubYwV3cz9fXnBMNO9zAsXrbwAwvGS57H6bS3Ga41g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j/eu9ORmO5qhq952WkxBSUUb5o/njuHnhAd/Kje7z9c=; b=GgKAXwKknDHKtqPby3uG687PvnzWQeODZEfw9x8NNi7Jaax1h0fN1J59quFr/EXXop4NVMR3WQe011RlVYg22oBM+8lo17U97zkhqIa1WoBtlxP9l1kH6/af7cwtc7S6lk3H10ePqP9Jd3yr9rVHs5zR9W/dRyQSzw00w0cpoLA= Received: from MN2PR11MB4447.namprd11.prod.outlook.com (52.135.39.217) by MN2PR11MB4414.namprd11.prod.outlook.com (52.135.36.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18; Wed, 27 Nov 2019 14:16:15 +0000 Received: from MN2PR11MB4447.namprd11.prod.outlook.com ([fe80::c4e6:5cec:9c4c:e37]) by MN2PR11MB4447.namprd11.prod.outlook.com ([fe80::c4e6:5cec:9c4c:e37%2]) with mapi id 15.20.2474.023; Wed, 27 Nov 2019 14:16:14 +0000 From: "Van Haaren, Harry" To: Aaron Conole CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] test/service: fix wait for service core Thread-Index: AQHVpSWExqf3N7awNES5aBD1Cy5nGqefDsQNgAAAfyA= Date: Wed, 27 Nov 2019 14:16:14 +0000 Message-ID: References: <20191127132027.80239-1-harry.van.haaren@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTI4YjI1ZTctZjA2OS00YjU1LWEzMWEtZDA0ZTcwN2Y1MDRjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibjRnU25kc3hGeGJ3R0JlcHMzSmJJbUxtZExFTEo3aUZaWFBkM2FIOTl4WEhWSjJLQWRJWFJ3XC9nRWVPQmpuckMifQ== dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=harry.van.haaren@intel.com; x-originating-ip: [192.198.151.163] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 66ac43b5-3954-49d8-1f5c-08d773445cbc x-ms-traffictypediagnostic: MN2PR11MB4414: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 023495660C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(376002)(346002)(396003)(366004)(136003)(199004)(189003)(13464003)(81166006)(81156014)(8676002)(8936002)(7736002)(305945005)(74316002)(6916009)(71200400001)(71190400001)(86362001)(14444005)(256004)(26005)(102836004)(7696005)(186003)(53546011)(76176011)(446003)(4326008)(6506007)(5660300002)(2906002)(52536014)(66066001)(33656002)(11346002)(66946007)(76116006)(66476007)(66446008)(64756008)(66556008)(6246003)(3846002)(6116002)(229853002)(478600001)(54906003)(99286004)(9686003)(55016002)(25786009)(316002)(14454004)(6436002); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR11MB4414; H:MN2PR11MB4447.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dOPESQVL9ZH2bNu/labX0Pvi21xF29N3YtMZXiqMSK9DlHux0OxyrG7yKgpd4/GW8Pb4zaFnKTMjZoH4tHYFLXqnEcZ0MoACWwr8wD83EapnWBPfEM/jvjywZsTaL9800MaWIcvmPN/vbOUDKRZ4i6CEh34oDx9iiXFiqmzGuHFpOw4KbZ2Qbg+TC0fQo4gEpbp+BnDAxKnnvr7KNdMosF7r4IVMYbGaWeP6ot5X/OoZK5PXTbxvgERW9deAxWUDH4Kwsf6x/CmWbnKE/CZPtp5J7CS+UAx65XDqbYQWOgMyPuZtsGXQUO96DVfiaCWbxMxau56urVGbFMdywH4xQ4gqoG4GcTQzy6xhZpoxrBHqhtK4IJQF8tTvTL+Ru1VHYMajyoBURL66phipUlIL71hpaPQYmTzQSKx9fUAb1shdh8prHHrZQKRI12rdlXuM x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 66ac43b5-3954-49d8-1f5c-08d773445cbc X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Nov 2019 14:16:14.5658 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wZcQv7Rk5llw4D1M4969IDS6q4nDRtUE42sM0BsPTRvJUs1zJdefaf7r9tVd2ZeBXAo3K/XFgtrI1WsJ9rHk+wdNKYJ8i9HWMwzCZnEJsoI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4414 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH] test/service: fix wait for service core X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Aaron Conole > Sent: Wednesday, November 27, 2019 2:10 PM > To: Van Haaren, Harry > Cc: dev@dpdk.org > Subject: Re: [PATCH] test/service: fix wait for service core >=20 > Harry van Haaren writes: >=20 > > This commit fixes a sporadic failure of the service_autotest > > unit test, as seen in the DPDK CI. The failure occurs as the main test > > thread did not wait on the service-thread to return, and allowing it > > to read a flag before the service was able to write to it. > > > > The fix changes the wait API call to specific the service-core ID, > > and this waits for cores with both ROLE_RTE and ROLE_SERVICE. > > > > The rte_eal_mp_wait_lcore() call does not (and should not) wait > > for service cores, so must not be used to wait on service-cores. > > > > Fixes: f038a81e1c56 ("service: add unit tests") > > > > Reported-by: Aaron Conole > > Signed-off-by: Harry van Haaren > > > > --- >=20 > It might also be good to document this behavior in the API area. It's > unclear that the lcore wait function which takes a core id will work, > but the broad wait will not. Yes agreed that docs can improve here - different patch. > > Given this is a fix in the unit test, and not a functional change > > I'm not sure its worth backporting to LTS / stable releases? > > I've not added stable on CC yet. >=20 > I think it's worth it if the LTS / stable branches use the unit tests > (otherwise, they will observe sporadic failures). Ok, I've added stable@dpdk.org on CC now > > app/test/test_service_cores.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/app/test/test_service_cores.c b/app/test/test_service_core= s.c > > index 9fe38f5e0..a922c7ddc 100644 > > --- a/app/test/test_service_cores.c > > +++ b/app/test/test_service_cores.c > > @@ -483,7 +483,7 @@ service_lcore_en_dis_able(void) > > int ret =3D rte_eal_remote_launch(service_remote_launch_func, NULL, > > slcore_id); > > TEST_ASSERT_EQUAL(0, ret, "Ex-service core remote launch failed."); > > - rte_eal_mp_wait_lcore(); > > + rte_eal_wait_lcore(slcore_id); > > TEST_ASSERT_EQUAL(1, service_remote_launch_flag, > > "Ex-service core function call had no effect."); >=20 > Should we also have some change like the following (just a guess): >=20 > diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.= c > index 9fe38f5e08..695c35ac6c 100644 > --- a/app/test/test_service_cores.c > +++ b/app/test/test_service_cores.c > @@ -773,7 +773,7 @@ service_app_lcore_poll_impl(const int mt_safe) >=20 > /* flag done, then wait for the spawned 2nd core to return */ > params[0] =3D 1; > - rte_eal_mp_wait_lcore(); > + rte_eal_wait_lcore(app_core2); >=20 > /* core two gets launched first - and should hold the service lock */ > TEST_ASSERT_EQUAL(0, app_core2_ret, I reviewed this usage of the function, and I believe it waits on applicatio= n cores (aka, ROLE_RTE, not ROLE_SERVICE). Hence this usage is actually corre= ct. Please review and double check my logic though - more eyes is good.