From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BA6E2A00E6 for ; Wed, 15 May 2019 22:04:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DDBE15B12; Wed, 15 May 2019 22:04:49 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60062.outbound.protection.outlook.com [40.107.6.62]) by dpdk.org (Postfix) with ESMTP id A86134D27 for ; Wed, 15 May 2019 22:04:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4QOY5Pi0qb+KfTUwMPRsFYzJ4/qElq1BMoUXqCllZz4=; b=T1aSaoyKsgPcONPRpDptd7bGmgMT4tCIy+NmUyQcqzJZuU+wDlLiD48C2L6WgELa/2yvAQNXK2zTyvWe7+dQrvni5DyKelxY85NYVIHHDJwdIaG5TTMYUar6PG3tGsjDXtJhbL+IE/pTuKXQS1ktf5EFR8vfgTDtrnT1IZaMLkY= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by VE1PR08MB4669.eurprd08.prod.outlook.com (10.255.114.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1878.22; Wed, 15 May 2019 20:04:47 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::f580:2129:8aa6:b534]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::f580:2129:8aa6:b534%4]) with mapi id 15.20.1878.024; Wed, 15 May 2019 20:04:47 +0000 From: Honnappa Nagarahalli To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , "stephen@networkplumber.org" , nd , nd Thread-Topic: [PATCH 2/2] test/rcu: use existing lcore API Thread-Index: AQHVCvPS3Nb90r+5V0WCcyQT0TmgnqZsnJEg Date: Wed, 15 May 2019 20:04:46 +0000 Message-ID: References: <1557907020-1548-1-git-send-email-david.marchand@redhat.com> <1557907020-1548-2-git-send-email-david.marchand@redhat.com> In-Reply-To: <1557907020-1548-2-git-send-email-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 63e7684e-1ed2-46f6-9bb0-08d6d970948b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB4669; x-ms-traffictypediagnostic: VE1PR08MB4669: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-forefront-prvs: 0038DE95A2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(39860400002)(346002)(366004)(396003)(199004)(189003)(14444005)(6436002)(25786009)(52536014)(9686003)(256004)(86362001)(55016002)(6116002)(76116006)(73956011)(186003)(6246003)(74316002)(5660300002)(26005)(446003)(2501003)(53936002)(66946007)(7736002)(64756008)(66556008)(66476007)(66446008)(305945005)(2906002)(229853002)(486006)(6506007)(102836004)(476003)(11346002)(71200400001)(71190400001)(14454004)(76176011)(66066001)(7696005)(54906003)(8676002)(81166006)(81156014)(8936002)(33656002)(3846002)(99286004)(316002)(72206003)(110136005)(4326008)(68736007)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4669; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: cfXt2tBiaM7q1EKIvJBL8gGOSP4N2W6P+Q+YohhagfSQKhE0c7sJPzLPARx2r/CZU57WzyUYj6zQ0C/ibgXKreOsx/6Mv7iihl5lhuK5mWybSwCuK7immQJB1Vde+sibMFMu5zsrLla7Wqgk+hivYf+0CzZ9nzuLlvm+Tl9yKgFad8mVGTtUIsH1Xwdz2TUytWAeTdRpa42v51jjvBivk5hIqdTEg0a2geSFdA5RzwTQXV6NJN11P13XG7AyGcZ6Yjh9+yWRPHX0NTCj5Iqk0FCxFYcJC4QmLYzuUCwOqYq+7Lpq0Wb3iB0ZfQyOLsmf7OnoK2y7p6YpgDTtousv0L9Fo2HOz1qpbmhDdAZyZcEuAmr3WWc3smeRtxNiTXbTdFCvHHbIwh1+D8YVkvlPbBb5n59IDJSvesgSPqbWd90= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63e7684e-1ed2-46f6-9bb0-08d6d970948b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2019 20:04:46.9594 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4669 Subject: Re: [dpdk-dev] [PATCH 2/2] test/rcu: use existing lcore API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190515200446.ILZrmjfb1JBv7InT5J3ot4jM998CdWI5BHviKuKYD0M@z> >=20 > Prefer the existing apis rather than direct access lcore_config that is g= oing to > disappear. >=20 > Fixes: b87089b0bb19 ("test/rcu: add API and functional tests") >=20 > Signed-off-by: David Marchand > --- > app/test/test_rcu_qsbr.c | 22 ++++++++++------------ > app/test/test_rcu_qsbr_perf.c | 12 ++++-------- > 2 files changed, 14 insertions(+), 20 deletions(-) >=20 > diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index > ed6934a..92ab0c2 100644 > --- a/app/test/test_rcu_qsbr.c > +++ b/app/test/test_rcu_qsbr.c > @@ -853,11 +853,10 @@ > hash_data[0][6] =3D NULL; >=20 > writer_done =3D 1; > - /* Wait until all readers have exited */ > - rte_eal_mp_wait_lcore(); > - /* Check return value from threads */ > + > + /* Wait and check return value from reader threads */ > for (i =3D 0; i < 4; i++) > - if (lcore_config[enabled_core_ids[i]].ret < 0) > + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) > goto error; > rte_hash_free(h[0]); > rte_free(keys); > @@ -913,17 +912,16 @@ > rte_eal_remote_launch(test_rcu_qsbr_writer, > (void *)(uintptr_t)(i - (test_cores / 2)), > enabled_core_ids[i]); > - /* Wait for writers to complete */ > + /* Wait and check return value from writer threads */ > for (i =3D test_cores / 2; i < test_cores; i++) > - rte_eal_wait_lcore(enabled_core_ids[i]); > + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) > + goto error; >=20 > writer_done =3D 1; > - /* Wait for readers to complete */ > - rte_eal_mp_wait_lcore(); >=20 > - /* Check return value from threads */ > - for (i =3D 0; i < test_cores; i++) > - if (lcore_config[enabled_core_ids[i]].ret < 0) > + /* Wait and check return value from reader threads */ > + for (i =3D 0; i < test_cores / 2; i++) > + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) > goto error; >=20 > for (i =3D 0; i < num_cores / 4; i++) > @@ -935,7 +933,7 @@ >=20 > error: > writer_done =3D 1; > - /* Wait until all readers have exited */ > + /* Wait until all readers and writers have exited */ > rte_eal_mp_wait_lcore(); >=20 > for (i =3D 0; i < num_cores / 4; i++) > diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.= c > index 16a43f8..6b1912c 100644 > --- a/app/test/test_rcu_qsbr_perf.c > +++ b/app/test/test_rcu_qsbr_perf.c > @@ -473,11 +473,9 @@ >=20 > writer_done =3D 1; >=20 > - /* Wait until all readers have exited */ > - rte_eal_mp_wait_lcore(); > - /* Check return value from threads */ > + /* Wait and check return value from reader threads */ > for (i =3D 0; i < num_cores; i++) > - if (lcore_config[enabled_core_ids[i]].ret < 0) > + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) > goto error; > rte_hash_free(h[0]); > rte_free(keys); > @@ -587,11 +585,9 @@ > rte_atomic64_add(&checks, i); >=20 > writer_done =3D 1; > - /* Wait until all readers have exited */ > - rte_eal_mp_wait_lcore(); > - /* Check return value from threads */ > + /* Wait and check return value from reader threads */ > for (i =3D 0; i < num_cores; i++) > - if (lcore_config[enabled_core_ids[i]].ret < 0) > + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) > goto error; > rte_hash_free(h[0]); > rte_free(keys); > -- > 1.8.3.1 Acked-by: Honnappa Nagarahalli