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 CE04AA04F3; Thu, 2 Jan 2020 17:58:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF8FC1C121; Thu, 2 Jan 2020 17:58:01 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 067481C10C for ; Thu, 2 Jan 2020 17:57:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 08:57:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,387,1571727600"; d="scan'208";a="216549848" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by fmsmga008.fm.intel.com with ESMTP; 02 Jan 2020 08:57:54 -0800 Received: from orsmsx152.amr.corp.intel.com (10.22.226.39) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jan 2020 08:57:49 -0800 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX152.amr.corp.intel.com (10.22.226.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jan 2020 08:57:48 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jan 2020 08:57:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqMCs7GjHC8lh1toWecbsmgzHFkjVYfEm2xd4SpPXQhgo44qJe5Un1VTK+U47TgXSk7y3SpU6t+WtlqcyCgaafB6Y9uAaR1lVdnYK8ssaorbDreduhPCmoGAX/tzVWSGlKDO6aAxJx7umfxk9vMyBXk0k3ZmZbrXb0+Z81guIRZUeUTKYr4oNtE7zk8LdnzOvhH1IF4Cb3g594Rs0kdM51W6tMEBX2walXayXXzK4efDOX+/EM8GiMPtpMFd+6+KR1VR9xeWkiBNpJRfqPrUj/cfG8roY2ypxBXPuCJuhlyXpS/0o3wiQWDoMGXGJiAlYtIfa1jJkNbUO94fW2Nouw== 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=1oZxU2PVVtR67TWC1pI0LnC8RN5WJmEH2pMMSURKKQg=; b=D7LcyoZnm/f4xa/Q3g92icMOtZ9Ec7JefMZ0hDxyWyLKz6iRp0bbjuhJybnZcxxbodcBrgir7fnjd/xdQzD/RZAv4YXbibL6aP1SweqktrLl8n+LA8MQhTuqp+0NlM1SNXRTAKp6z+ssl0j9a+M+fCRrWhghVMBJeRePDp7wACUcHu7qlYfPejVUpaZOlzzIZnU9AsBilHVjRe1yb9BoUrIPw6CA4D7QQYoMW11v+wdUrNWXLniZgDV/xLFy6qBmubFo9DknMuBcNkSxKwidnjnqGvkNTJZNAS4Ftm0oy+p8pcUqHPHKFst2o7RrIzWwP2VoiU2s8RkZfhAe0pCxJg== 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=1oZxU2PVVtR67TWC1pI0LnC8RN5WJmEH2pMMSURKKQg=; b=gFTCybSaJ/bDHjLAqk1M1ZMAQk1hsJ9s82Y3sz2T1QyAguGpHxLyzbh8J3JOSv3imOlujgUODPRYlLI0Ni+xWrDM6qBqG4oqRJ5Gd/urFCIj0XiPfssVv+KloPLE1HG1jZmLttq2PM1Zx/EsGMq1qSDXO7nAw5/qQu8SyevoD8k= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (52.135.94.19) by SN6PR11MB3038.namprd11.prod.outlook.com (52.135.124.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.12; Thu, 2 Jan 2020 16:57:46 +0000 Received: from SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386]) by SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386%7]) with mapi id 15.20.2602.012; Thu, 2 Jan 2020 16:57:46 +0000 From: "Ananyev, Konstantin" To: Honnappa Nagarahalli , "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@arm.com" , "ruifeng.wang@arm.com" , "gavin.hu@arm.com" , "nd@arm.com" Thread-Topic: [PATCH v7 11/17] test/ring: modify burst enq/deq perf test cases Thread-Index: AQHVtvBxJbYOnHFGPU6nwy0L8OYumafXrUSA Date: Thu, 2 Jan 2020 16:57:46 +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: <20191220044524.32910-12-honnappa.nagarahalli@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjlhMWYxMGEtMzJjYS00NjRmLWIzZjEtOTQwNjk2ZjFkMTU0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidThUV2lpMWpEVUR6ZHhzK29RTzBFZUdLYWJjRmtvRDJWcWQ5R25qNjhZVm5LV0xQcFJxNjF4VmowV0ZuVHZpZiJ9 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=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.189] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4654178b-4226-47a6-2c50-08d78fa4e448 x-ms-traffictypediagnostic: SN6PR11MB3038: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3276; x-forefront-prvs: 0270ED2845 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(136003)(396003)(346002)(376002)(199004)(189003)(4326008)(186003)(66556008)(66476007)(66946007)(66446008)(86362001)(64756008)(54906003)(2906002)(316002)(9686003)(478600001)(7696005)(110136005)(71200400001)(6506007)(26005)(76116006)(55016002)(33656002)(7416002)(5660300002)(8936002)(81166006)(81156014)(8676002)(52536014)(21314003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3038; H:SN6PR11MB2558.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: 88vDMmSSviEqQFF0iqvcua1vE/Pc/WdjdTOiy2ppIfRx5CnbEQL5lvdJHx5LKCyX7p77fpah1Bg56p3/OpMaNcg6+MEsO3odjB5xe3OBIcxMoLK58R+wYQJUlRtGLt1X8/RB041Iy4U8bES4txzORKTXoUfUNfvNu7usxjk1O7L8sv0yYGcHq41Y5H6k4rNf5s762cV34/3Rdlrxn18DRaGbB/W3i5RV8U69O5hG6QouAJPfC36Zz8BbUcjXHXs0o1e3XuKG7I+CICJRZIhQtClMvKh4Id+00Fm8XeNihM/WHkBQ+NpIp87TKrhm1DVwbCZhF76D3pGvJg3fPELarG/gsvTmfWqrp6MRFB8qjWZe1XkK9D/fD+gmSn57DosdSw+OCUSD2nLRwLKIrAmI83hVy/og6aFWYZi4d56tC8LZEjROtNi9lkmZFsZkhNH+YuB1s99zdjSxbqI61jAayaLhrKbtLfG5gQ1Fm+d8msZCfSMVf6cqGkbulYtUhwbm Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4654178b-4226-47a6-2c50-08d78fa4e448 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jan 2020 16:57:46.1469 (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: Hc2sc5/+hX1MBK2E1DW4g8en157TyhTqb2yZEDIv5VPzUMBl/miYgJg/JgXG6INTxZvJEavk985pMFlh7BH6HFNsr3GVXRFoyhLJow8gtzQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3038 X-OriginatorOrg: intel.com 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" >=20 > Add test cases to test legacy and rte_ring_xxx_elem APIs for > burst enqueue/dequeue test cases. >=20 > Signed-off-by: Honnappa Nagarahalli > Reviewed-by: Gavin Hu > --- > app/test/test_ring_perf.c | 78 ++++++++++++++++++++------------------- > 1 file changed, 40 insertions(+), 38 deletions(-) >=20 > 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, con= st int esize, > } >=20 > /* > - * Test that does both enqueue and dequeue on a core using the burst() A= PI calls > - * instead of the bulk() calls used in other tests. Results should be th= e same > - * as for the bulk function called on a single lcore. > + * Test that does both enqueue and dequeue on a core using the burst/bul= k 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; >=20 > - 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; >=20 > - 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(); >=20 > - 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); > } > + missing rte_free(burst); ? > + return 0; > } >=20