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 9EE8FA04FA; Tue, 7 Jan 2020 23:33:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF1FC1D996; Tue, 7 Jan 2020 23:33:49 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130074.outbound.protection.outlook.com [40.107.13.74]) by dpdk.org (Postfix) with ESMTP id ACB961D993 for ; Tue, 7 Jan 2020 23:33:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KwVTd2wkm5ZHpf7M+nPtFwdwIiU+G9AJZyKK8AEoQdk=; b=XFSJTjE3eYasJdHsDrOc92RGx32WAWbFcSVYdFPrWO6IKehhYeI1n7EVb4KipKCpsN3QnWhFbgj4vlBQeNFn2tA5sdcTuvxFk/ZLRZaIyWTvZj/KzcVUSHTG9lphr+1z/MEaefScT+3W7dp6MvkT9X5qoj5eovqb0xbQtpKYRw4= Received: from VI1PR08CA0099.eurprd08.prod.outlook.com (2603:10a6:800:d3::25) by VI1PR08MB4237.eurprd08.prod.outlook.com (2603:10a6:803:fc::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11; Tue, 7 Jan 2020 22:33:46 +0000 Received: from VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::208) by VI1PR08CA0099.outlook.office365.com (2603:10a6:800:d3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.10 via Frontend Transport; Tue, 7 Jan 2020 22:33:46 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT018.mail.protection.outlook.com (10.152.18.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11 via Frontend Transport; Tue, 7 Jan 2020 22:33:46 +0000 Received: ("Tessian outbound ca1df68f3668:v40"); Tue, 07 Jan 2020 22:33:46 +0000 X-CR-MTA-TID: 64aa7808 Received: from e3c6f78b54a4.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DF6E8CEC-357D-4F91-93A7-018A5C0928A0.1; Tue, 07 Jan 2020 22:33:41 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e3c6f78b54a4.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jan 2020 22:33:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BU2caV3PphOeaYVAHODCoqsM4elbujVMWj7uVOM/8N+up3s27gF9bCCAf2r/LAiEimilTakXOHevG6Pj0msyCG18VM07OZxO89h0BGaTLyKhvbNvbp+hAPIcWpnOReq4xajrIQ4JkTSO8GcF0JSWv0XqvNNFGi9pLHX8rIdZo/SrCeOPyroXhwscsDjbpXzk9uXB3LOMsXRyM1UcSg/29bYI7eiFtuDFjE3KBEWZhtqRu4ncYgC+dC4U75YQpAOvVwT70o+LmjiLdU7E4pb4XRTm2QnVTAgPxzuPP3Ow9AabK5x+yxXAK1GW4MtqEuaMCd3mU8aS1kvM1hVwQTfFkA== 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=KwVTd2wkm5ZHpf7M+nPtFwdwIiU+G9AJZyKK8AEoQdk=; b=MHKM3At2MlGKUM7dfTmmDAkXfaOZ5IYaZOK5xST5cnG1xuo95v8W0dwTZD64IFiU6jv9Jg0dBiQNyRr5BrXKC9vQbL0Td+nLYilves40Yso1fsTS8xk4UjnC0OhL/27qqul/1ImHnPG5/bbAbNJSGUuuVEAoyd9Zvh++dQXkD+R0BLbLnSphJYrjm+8ucLUYOnFAkcxeaLfM0rIbHkStdOPLTO3iSbWdF4jiDQ2BPAwOOLzxsBuYkCqUnAqNeZz6i/P1RDYV95Qq1YSX9xLZXlYTHtPQULTQSrm0B487c+T8O5c8EnoVGirqnR/3QGTtg/iqXsuY12sO/uV7Cfm47g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KwVTd2wkm5ZHpf7M+nPtFwdwIiU+G9AJZyKK8AEoQdk=; b=XFSJTjE3eYasJdHsDrOc92RGx32WAWbFcSVYdFPrWO6IKehhYeI1n7EVb4KipKCpsN3QnWhFbgj4vlBQeNFn2tA5sdcTuvxFk/ZLRZaIyWTvZj/KzcVUSHTG9lphr+1z/MEaefScT+3W7dp6MvkT9X5qoj5eovqb0xbQtpKYRw4= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB4703.eurprd08.prod.outlook.com (10.255.27.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11; Tue, 7 Jan 2020 22:33:39 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2%7]) with mapi id 15.20.2602.016; Tue, 7 Jan 2020 22:33:39 +0000 From: Honnappa Nagarahalli To: "Ananyev, Konstantin" , "olivier.matz@6wind.com" , "sthemmin@microsoft.com" , "jerinj@marvell.com" , "Richardson, Bruce" , "david.marchand@redhat.com" , "pbhagavatula@marvell.com" CC: "dev@dpdk.org" , Dharmik Thakkar , Ruifeng Wang , Gavin Hu , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v7 10/17] test/ring: modify single element enq/deq perf test cases Thread-Index: AQHVwY6gdv0w5OR0gku9yZ1wpVockKfeukkwgACtSYCAAAe8YA== Date: Tue, 7 Jan 2020 22:33:39 +0000 Message-ID: References: <20190906190510.11146-1-honnappa.nagarahalli@arm.com> <20191220044524.32910-1-honnappa.nagarahalli@arm.com> <20191220044524.32910-11-honnappa.nagarahalli@arm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: c85de53e-6f1e-4057-928e-dd4236bbcc57.0 x-checkrecipientchecked: true Authentication-Results-Original: 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-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5ded7b5c-cde5-4c94-d841-08d793c1a8dc X-MS-TrafficTypeDiagnostic: VE1PR08MB4703:|VE1PR08MB4703:|VI1PR08MB4237: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:4303;OLM:4303; x-forefront-prvs: 027578BB13 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(346002)(366004)(376002)(39860400002)(136003)(396003)(51234002)(189003)(199004)(6506007)(7696005)(71200400001)(2906002)(478600001)(9686003)(4326008)(186003)(54906003)(110136005)(316002)(81166006)(81156014)(8936002)(76116006)(66446008)(8676002)(64756008)(66556008)(66476007)(5660300002)(33656002)(26005)(66946007)(86362001)(52536014)(55016002)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4703; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: V3tHdI7L46tWbjgx1+7qWjSSYFvgiLbsf5ZisCcK1OlAeSDHlXPRH30vSgD3mpUHD8C2B2zL8tZoMkElX3qcJOcwrNX0sEokkWGDKfC2DFIDu7xABTKrZEplqBovkn/or9Tkpwg3WU31nKPej9sYa69w1BQhMKofIMnK17hH8knvW/tiWsma6jYpa3hfzhcWvccErQ6W8Pp2UNSiOSLODbwbIxGn3Ntn6wdFoWzpUMYMTbBmjBCyCQpIpUfoxq98i1JFW7MuuxH6CLk4+x0KSQBNM3PWCVvbJo8Zn+6ZKq9voGpteDuzU0ng64H9g1uPVQWC6LcoZ8i7I1VNyszBPgr3npMtbyeAGrgKwSmILiVA33PU8V3KP/LEcqlV1OQX2TIL2F8OB0aOsQBRcoha8vhyvHNhWlhSiOE+SXOc/NKiSQdx10zZ3hLsdaQJVKBzj29eaq7pstS69G/j9xoIeycQmr4iXznA1IH8wfHohPEbu8sYIAByENHNgE9Jhc3Le9wzbs/45+hDM0nhFd+RRw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4703 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(39860400002)(136003)(346002)(199004)(189003)(51234002)(70206006)(70586007)(478600001)(33656002)(110136005)(54906003)(26826003)(336012)(9686003)(4326008)(55016002)(356004)(2906002)(5660300002)(7696005)(6506007)(86362001)(81166006)(8676002)(8936002)(81156014)(36906005)(186003)(52536014)(316002)(26005)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB4237; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 8cd58457-0d4f-48bd-88ed-08d793c1a471 NoDisclaimer: True X-Forefront-PRVS: 027578BB13 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YsWrGNZF9+dAR8YiUp14F2Cg+gxetnX8YLvz3NJTrg3+x8D1zhLjxLhqptxH1zFbdDnLdQ6HU01NTF8mzYmqMbPD/DtIGduan86dnMjp5yKeljeq0Kvw5oZwpQD/AYiRxceZv6s6RZX3K4CK6mCq5JoPTEQaFoZG5CQt3baZ0N+eB91mPaKJsTZTtEhlTLeWSPdBfDGMbdalFc8p3mrWl4hdKn9zMqDa3Yan+PFdGa3/EPCqezjtVtHupdoWbn6i01VmxPd+cgHfHOlZ4V15+KWa1r9NtmFTPU+4gyj7UUGd0TWVPeJS+PjikYhdD3pPkXIjuefUzEokwWs45+C0SGcxXhPVylxxNaS4/7cKny5UAof/DALDF4FVwJWMBccSBi3qSX7J+RemYgqf9CNnAd8oNBQEQagP3WGClA7Ne3GQYBdOucY2CSg8egZmyrHHDEHjw9mhlMdI1z6nOULnp0prZdEFJddPxISV30fAlZk5hihuy/fE7f7hWEMKA3MCgk2duG7pOqiyBd8yXFVc4Q== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2020 22:33:46.6170 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ded7b5c-cde5-4c94-d841-08d793c1a8dc X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4237 Subject: Re: [dpdk-dev] [PATCH v7 10/17] test/ring: modify single element enq/deq perf test cases 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" >=20 > > > > Add test cases to test rte_ring_xxx_elem APIs for single element > > > > enqueue/dequeue test cases. > > > > > > > > Signed-off-by: Honnappa Nagarahalli > > > > Reviewed-by: Gavin Hu > > > > --- > > > > app/test/test_ring_perf.c | 100 > > > > ++++++++++++++++++++++++++++++-------- > > > > 1 file changed, 80 insertions(+), 20 deletions(-) > > > > > > > > diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c > > > > index 6c2aca483..5829718c1 100644 > > > > --- a/app/test/test_ring_perf.c > > > > +++ b/app/test/test_ring_perf.c > > > > @@ -13,6 +13,7 @@ > > > > #include > > > > > > > > #include "test.h" > > > > +#include "test_ring.h" > > > > > > > > /* > > > > * Ring > > > > @@ -41,6 +42,35 @@ struct lcore_pair { > > > > > > > > static volatile unsigned lcore_count =3D 0; > > > > > > > > +static void > > > > +test_ring_print_test_string(unsigned int api_type, int esize, > > > > + unsigned int bsz, double value) > > > > +{ > > > > + if (esize =3D=3D -1) > > > > + printf("legacy APIs"); > > > > + else > > > > + printf("elem APIs: element size %dB", esize); > > > > + > > > > + if (api_type =3D=3D TEST_RING_IGNORE_API_TYPE) > > > > + return; > > > > + > > > > + if ((api_type & TEST_RING_N) =3D=3D TEST_RING_N) > > > > + printf(": default enqueue/dequeue: "); > > > > + else if ((api_type & TEST_RING_S) =3D=3D TEST_RING_S) > > > > + printf(": SP/SC: "); > > > > + else if ((api_type & TEST_RING_M) =3D=3D TEST_RING_M) > > > > + printf(": MP/MC: "); > > > > + > > > > + if ((api_type & TEST_RING_SL) =3D=3D TEST_RING_SL) > > > > + printf("single: "); > > > > + else if ((api_type & TEST_RING_BL) =3D=3D TEST_RING_BL) > > > > + printf("bulk (size: %u): ", bsz); > > > > + else if ((api_type & TEST_RING_BR) =3D=3D TEST_RING_BR) > > > > + printf("burst (size: %u): ", bsz); > > > > + > > > > + printf("%.2F\n", value); > > > > +} > > > > + > > > > /**** Functions to analyse our core mask to get cores for > > > > different tests ***/ > > > > > > > > static int > > > > @@ -335,32 +365,35 @@ run_on_all_cores(struct rte_ring *r) > > > > * Test function that determines how long an enqueue + dequeue of > > > > a > > > single item > > > > * takes on a single lcore. Result is for comparison with the bulk > enq+deq. > > > > */ > > > > -static void > > > > -test_single_enqueue_dequeue(struct rte_ring *r) > > > > +static int > > > > +test_single_enqueue_dequeue(struct rte_ring *r, const int esize, > > > > + const unsigned int api_type) > > > > { > > > > - const unsigned iter_shift =3D 24; > > > > - const unsigned iterations =3D 1< > > > - unsigned i =3D 0; > > > > + int ret; > > > > + const unsigned int iter_shift =3D 24; > > > > + const unsigned int iterations =3D 1 << iter_shift; > > > > + unsigned int i =3D 0; > > > > void *burst =3D NULL; > > > > > > > > - const uint64_t sc_start =3D rte_rdtsc(); > > > > - for (i =3D 0; i < iterations; i++) { > > > > - rte_ring_sp_enqueue(r, burst); > > > > - rte_ring_sc_dequeue(r, &burst); > > > > - } > > > > - const uint64_t sc_end =3D rte_rdtsc(); > > > > + (void)ret; > > > > > > Here, and in few other places, looks redundant. > > The compiler throws an error since 'ret' is assigned a value, but it is= not > used. >=20 > Probably one way to change TEST_RING_ENQUEUE() from macro to inline- > function returning ret. >=20 Yes, that is possible, will do. > > > > >