From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDD63C33C99 for ; Tue, 7 Jan 2020 05:42:28 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 30746207FD for ; Tue, 7 Jan 2020 05:42:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="p3TnTZfG"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="p3TnTZfG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30746207FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C30BE1D910; Tue, 7 Jan 2020 06:42:26 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30065.outbound.protection.outlook.com [40.107.3.65]) by dpdk.org (Postfix) with ESMTP id D47201D90E for ; Tue, 7 Jan 2020 06:42:25 +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=Dv4RSK5E0DHloVw2fNtf3qCeR2Sb18/S4IXVJcFte4I=; b=p3TnTZfGktShq4J2MuT5iQDWAZ/MlXJC36uoHX6rkZ1FzOrvNaMPa6yh+Z7OErqW43zzerTin3KKWaCDSNa3mEB24JCDfyELwnBvI1koVOHMco2zAVPEdEmZzrlEBpDvWQlNRSyc3fgCX45Ur4CDeOQ4yNsHOjGXgxzZge5ENXM= Received: from VI1PR0802CA0027.eurprd08.prod.outlook.com (2603:10a6:800:a9::13) by AM0PR08MB3475.eurprd08.prod.outlook.com (2603:10a6:208:df::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.15; Tue, 7 Jan 2020 05:42:25 +0000 Received: from DB5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::202) by VI1PR0802CA0027.outlook.office365.com (2603:10a6:800:a9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.12 via Frontend Transport; Tue, 7 Jan 2020 05:42:24 +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 DB5EUR03FT054.mail.protection.outlook.com (10.152.20.248) 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 05:42:24 +0000 Received: ("Tessian outbound 121a58c8f9bf:v40"); Tue, 07 Jan 2020 05:42:24 +0000 X-CR-MTA-TID: 64aa7808 Received: from 320d6add7b9c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8C4F624C-4715-423D-9ACA-944B1113B23F.1; Tue, 07 Jan 2020 05:42:19 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 320d6add7b9c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jan 2020 05:42:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oeMsRAB+O2ezNHZyP2dAMMCOE3bnMeLCrzzot+uSl4enpB1lhWTDQhrsO53zFnVQmhmq8LBHLhFunagymRBAO0vasQ40UUzPdRZwqgU/KeRrKgr9WMCBxakn+tY3Wn71ZBa5reqI4a3vhbl61t3YHGr4fk6iBnsfVpKQ89Lzlt/ianvg6HIdnyZOgGzgutxenbfyRW03CahRNfFbyuBEsMh4CG3/UtEUg0t31S+QfxFqY5yHSXZq4RQvAWI5BCD3C2g6XWqRSQnKWNWG44jRELhIVHSLBkzN8hYYOKu3YoEDt6+KDr83XsVAlovkwqYw03iasWmTfJgEDYFo0aJG8Q== 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=Dv4RSK5E0DHloVw2fNtf3qCeR2Sb18/S4IXVJcFte4I=; b=JLALe2UwwlhjlZO0cT2rupu051VrzT/rENhloua5P275Xe2V9VgDmDkdYlT/gPbuBR/+HMlIs0ALDlOJVMuA843QWKDi1gQ8RHKqAmAL3wAEY66cxGYYkcOVtFJqa6m2AxZ1iDbg6nmQFIsZTC7/KOoL7QfXgb17nC97Fpbad5TaQ0FbdpepARMWVqObfFdZFrdPtpWFhn3QDwXGUjakftBudzjjMSfyI/NRt6dthzMMPGt+DZeQqVLPn+DKPTjAOaQRExzcml+0KjVmtXC+4qG9lUkdO9wAOhApmaKUq3phQL9Hy7fIfxBeBpVj7Nfvx9+hmUCzgUkOgspxiDHTlg== 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=Dv4RSK5E0DHloVw2fNtf3qCeR2Sb18/S4IXVJcFte4I=; b=p3TnTZfGktShq4J2MuT5iQDWAZ/MlXJC36uoHX6rkZ1FzOrvNaMPa6yh+Z7OErqW43zzerTin3KKWaCDSNa3mEB24JCDfyELwnBvI1koVOHMco2zAVPEdEmZzrlEBpDvWQlNRSyc3fgCX45Ur4CDeOQ4yNsHOjGXgxzZge5ENXM= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB4720.eurprd08.prod.outlook.com (10.255.115.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.12; Tue, 7 Jan 2020 05:42:16 +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.015; Tue, 7 Jan 2020 05:42:16 +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 , nd Thread-Topic: [PATCH v7 11/17] test/ring: modify burst enq/deq perf test cases Thread-Index: AQHVwY3K8uu9DPS1z0C6ZHEmdeC+d6fetsyw Date: Tue, 7 Jan 2020 05:42:16 +0000 Message-ID: References: <20190906190510.11146-1-honnappa.nagarahalli@arm.com> <20191220044524.32910-1-honnappa.nagarahalli@arm.com> <20191220044524.32910-12-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: 7b0665d0-d7cd-4392-9e04-6d7a45bc90a1.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: ec87e3c1-4887-414e-1c35-08d793345f83 X-MS-TrafficTypeDiagnostic: VE1PR08MB4720:|VE1PR08MB4720:|AM0PR08MB3475: 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:3276;OLM:3276; x-forefront-prvs: 027578BB13 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(39860400002)(366004)(346002)(396003)(199004)(189003)(66446008)(66476007)(9686003)(2906002)(64756008)(478600001)(4326008)(7696005)(66946007)(55016002)(66556008)(76116006)(26005)(186003)(6506007)(110136005)(316002)(8936002)(54906003)(33656002)(52536014)(71200400001)(8676002)(86362001)(81166006)(5660300002)(81156014)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4720; 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-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: nZ4ez+D6W/HCPXfkGaAW8g0k/ngFPLQs66/Mfph1qT1G1W97x3hpx9GMQ8g2D5mqsEfzZf4Hw3Kzw1DLzcOS5zNFgtEF3P/wo+i8aSBRsDnBmzAA9E9ekwLrFoOwLb7pw1S3KdD6U1tEx9wWmyZxKbl5w/R/U7kXX93Z3g56SKGpgClh7zWyDU8GqePO8IHLiiOSLOrFMMu4TwaYp/hYQAInMpphMWhRKel4p8pCJ8N/9706XFbhLgIWPOMM6RSW8YT18ElgkAshEzd4rsdDLHRk4TPG1rzo+sz2eELfYTLpmycEBLl5gLHJkJEylFm5qvjQZSS13jDO8odXBE6Z3/JhomagzD7Kzq3vOImzrP1B33vqVKSjjiH/DqOJkEzgS7hf3RcFbhdttFebaNDEQR55IClRJwln5EymzzZXmR4S09QUya93sXZqSfZ6Hfq2q9QwLs4QNo18Y+GlrGLqt40FpHInh6spkvjIniADjz9KfqiGhkp+po6Y1sC3UcH1 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4720 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT054.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)(136003)(39860400002)(346002)(396003)(376002)(199004)(189003)(52536014)(8676002)(8936002)(81166006)(86362001)(5660300002)(356004)(81156014)(9686003)(336012)(186003)(55016002)(478600001)(2906002)(110136005)(33656002)(26826003)(54906003)(26005)(70586007)(316002)(7696005)(6506007)(70206006)(4326008)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3475; 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: 3372f541-a062-479d-b539-08d793345aa3 NoDisclaimer: True X-Forefront-PRVS: 027578BB13 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z8nOdGjrHmsrCatDO9lDZny0lmk5/lQE6CbZRW1/31s0FDhotywVpdKSWI7bzfjbx7mNqNVh9qt/36qlUYOZ4uwZJCsQGKKMLEg5H+vkN5sCwYAxZPKiQgjlrwOj8cpP9sF/XabTxddd/F3g7XVEbwwhiO3/wDsgm4AkvB55tAuVqqmFmFUGbNTy0EIImy5AYsxm28NHzYWMPZ+HTU2mG5959vVq67BcLaO2dab4pkdv6aTarOT323S5iil+1MJC+AhQQaoq6CZtDtMHH8xfFOz1Jnuswh7dlmW/Lw9kkqKigFqexuDSNBqOynq5b2TSVAVm4mNhjRUk4PdcZeVRZWAB6443TrdWadd1kAVnjv9ZE+Jf7aIxY4fMwfU9YBEf4DcRNDLtIQY1zhQRXfBnuwzySUPNv/CSi9ARR2GpVDCrqMsxR9Jn/ysuzZm0jIhZseFrEWum38wpa26mZ2/AM8nlxvkPjykDogVjJLNo001DpNOi5OhzWSrhqi9VSN3n X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2020 05:42:24.5694 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec87e3c1-4887-414e-1c35-08d793345f83 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: AM0PR08MB3475 Subject: Re: [dpdk-dev] [PATCH v7 11/17] test/ring: modify burst 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" > > > > Add test cases to test legacy and rte_ring_xxx_elem APIs for burst > > enqueue/dequeue test cases. > > > > Signed-off-by: Honnappa Nagarahalli > > Reviewed-by: Gavin Hu > > --- > > app/test/test_ring_perf.c | 78 > > ++++++++++++++++++++------------------- > > 1 file changed, 40 insertions(+), 38 deletions(-) > > > > diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c > > index 5829718c1..508c688dc 100644 > > --- a/app/test/test_ring_perf.c > > +++ b/app/test/test_ring_perf.c > > @@ -397,47 +397,40 @@ test_single_enqueue_dequeue(struct rte_ring *r, > > const int esize, } > > > > /* > > - * Test that does both enqueue and dequeue on a core using the > > burst() API calls > > - * instead of the bulk() calls used in other tests. Results should be > > the same > > - * as for the bulk function called on a single lcore. > > + * Test that does both enqueue and dequeue on a core using the > > + burst/bulk API > > + * calls Results should be the same as for the bulk function called > > + on a > > + * single lcore. > > */ > > -static void > > -test_burst_enqueue_dequeue(struct rte_ring *r) > > +static int > > +test_burst_bulk_enqueue_dequeue(struct rte_ring *r, const int esize, > > + const unsigned int api_type) > > { > > - const unsigned iter_shift =3D 23; > > - const unsigned iterations =3D 1< > - unsigned sz, i =3D 0; > > - void *burst[MAX_BURST] =3D {0}; > > + int ret; > > + const unsigned int iter_shift =3D 23; > > + const unsigned int iterations =3D 1 << iter_shift; > > + unsigned int sz, i =3D 0; > > + void **burst =3D NULL; > > > > - for (sz =3D 0; sz < sizeof(bulk_sizes)/sizeof(bulk_sizes[0]); sz++) { > > - const uint64_t sc_start =3D rte_rdtsc(); > > - for (i =3D 0; i < iterations; i++) { > > - rte_ring_sp_enqueue_burst(r, burst, > > - bulk_sizes[sz], NULL); > > - rte_ring_sc_dequeue_burst(r, burst, > > - bulk_sizes[sz], NULL); > > - } > > - const uint64_t sc_end =3D rte_rdtsc(); > > + (void)ret; > > + burst =3D test_ring_calloc(MAX_BURST, esize); > > + if (burst =3D=3D NULL) > > + return -1; > > > > - const uint64_t mc_start =3D rte_rdtsc(); > > + for (sz =3D 0; sz < RTE_DIM(bulk_sizes); sz++) { > > + const uint64_t start =3D rte_rdtsc(); > > for (i =3D 0; i < iterations; i++) { > > - rte_ring_mp_enqueue_burst(r, burst, > > - bulk_sizes[sz], NULL); > > - rte_ring_mc_dequeue_burst(r, burst, > > - bulk_sizes[sz], NULL); > > + TEST_RING_ENQUEUE(r, burst, esize, bulk_sizes[sz], > > + ret, api_type); > > + TEST_RING_DEQUEUE(r, burst, esize, bulk_sizes[sz], > > + ret, api_type); > > } > > - const uint64_t mc_end =3D rte_rdtsc(); > > - > > - double mc_avg =3D ((double)(mc_end-mc_start) / iterations) / > > - bulk_sizes[sz]; > > - double sc_avg =3D ((double)(sc_end-sc_start) / iterations) / > > - bulk_sizes[sz]; > > + const uint64_t end =3D rte_rdtsc(); > > > > - printf("SP/SC burst enq/dequeue (size: %u): %.2F\n", > > - bulk_sizes[sz], sc_avg); > > - printf("MP/MC burst enq/dequeue (size: %u): %.2F\n", > > - bulk_sizes[sz], mc_avg); > > + test_ring_print_test_string(api_type, esize, bulk_sizes[sz], > > + ((double)(end - start)) / iterations); > > } > > + >=20 > missing rte_free(burst); > ? Yes, will fix. >=20 > > + return 0; > > } > >