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 DD5E1A034F; Thu, 7 May 2020 15:38:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 641281DC97; Thu, 7 May 2020 15:38:38 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 07F651DC5C for ; Thu, 7 May 2020 15:38:35 +0200 (CEST) IronPort-SDR: 1llbE8KoMtzSSkKg3XCaJvBQi8DYx9YTrZKc6p1Jwh3fp5CoALFYDgELfeXJu+heILCZtBrDCF 7bS/14dWTJGg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 06:38:33 -0700 IronPort-SDR: 5CqyBjpt7A5SESCSRJz0VqWuEQVrkWj+AMczusCeVILcLYKlfnNX+L6ZjZ7MWYeXCf/T2riSgz 80nMInykpqpw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,363,1583222400"; d="scan'208";a="296537209" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by orsmga008.jf.intel.com with ESMTP; 07 May 2020 06:38:32 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 06:38:32 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX111.amr.corp.intel.com (10.22.240.12) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 06:38:32 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 06:38:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gf693HgtyMNIU91VDphrchN7eOATY1HdNauWoSqPnUkLNDWkiYj3EtkS6scWVtMsHEXmnyaEijQJCahRd3cRC1n3TNPL6bPNo3mku7iFt77cCkIHnu1A2kIt9cp/EBuRU4z+lKrskY2iSWCnyriN14v6H93wEwFpfxX/0xdKu+Yt8D2hMKAAUjcEg2k/oWOGn8dQexAndjNX3SEreciTRsj0RH7AQy4V/C8SFBOjDpkSootXGQ6k50JU7DdU9QfFlM0Fsq1/jPnh+I6/wy/TTWDjUg0qxo/ODoBksBOVwriqbHuBuwgOa+npxn6TUJq3X5OPz7kHD1EilPlxTgYYjg== 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=ROi1GR46Ydh9FElhsqSgxwd3exXfJUwN+mAAIb/JG+U=; b=IDYmUdUsWewl9/j9oy+VW8zZ3oHamYJBEjFSfMfix3Uty4m13l0c3ds/G7c2xe1kIHeqWpOxelc5XObvSKCudpodDCoNB2LP5IB95kXqUS23WzOsCxk01JuybY9pZD/8JJNlvlrlvYiN+M+4s0IdUNMiaKgwrLeg1eslvNpzpf5eRUest2b0v1lDy3xdyvawDfkt47LMlvlMwy04AQ8yPSlebBMapomyB52ZaiKBBNDHFeF7ObpPBXEp4eqLAKD/4oq+w0K3a3xupBm66vFlSXvFoUVDmi0szSrWAA/mbrFA/7iW/SLNfTxO3u2p4eS2Wf/UwTNjkOqguSxB0J07eA== 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=ROi1GR46Ydh9FElhsqSgxwd3exXfJUwN+mAAIb/JG+U=; b=lZZuvVWw9SUpXhqUPexWMMniqb+AqOnPF3a/elTIaNHNTCU6DzspcN4z+yoTXUcpkEOjIaxs+mMtVtMbM7w73WgwSHoKpCaBfGbePUhG4qXnF8eZFyO7wJ5D4BtjCsQrN1yLVe9xzzyq2acbG/5NAAkoPDRo/8cVF2XEoD6Zyus= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB3579.namprd11.prod.outlook.com (2603:10b6:5:13c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Thu, 7 May 2020 13:38:28 +0000 Received: from DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa]) by DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa%6]) with mapi id 15.20.2958.034; Thu, 7 May 2020 13:38:28 +0000 From: "Iremonger, Bernard" To: Dharmik Thakkar , "Lu, Wenzhuo" , "Wu, Jingjing" CC: "dev@dpdk.org" , "nd@arm.com" Thread-Topic: [PATCH 1/5] app/testpmd: print clock with CPU cycles per pkt Thread-Index: AQHWI/G1PmGPjZXLrEuBBbNmLoYH5qicoKkA Date: Thu, 7 May 2020 13:38:28 +0000 Message-ID: References: <20200506215847.7628-1-dharmik.thakkar@arm.com> In-Reply-To: <20200506215847.7628-1-dharmik.thakkar@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.188] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 912baca2-1c15-4e03-86af-08d7f28becfb x-ms-traffictypediagnostic: DM6PR11MB3579: 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:4502; x-forefront-prvs: 03965EFC76 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HN1qqst3nWplRFomgUGL/IpJWwH6I0/QJRzQX5aA6XWNI5fqlnqcG+bmR+q3b23jSVvH5swo5tgSJA4Qe593Mz/H+Be57z+GQlIxfei0PdQix/btzygVThGVHSVwJje8FB3WFMWRcw+/6WfY+IOqfdJFL8VlBtm+kRGJdMPCsboLGvbIjBzzAaGFPHJN4XrQ+B7LQXciwro96J1BEiTyNJYRyaFqsJgal+/ztob2n4fivpLTm/Fu6xT6FiFrX2ri9Qyrr0279wogCl8DexlUhgQsV0yG3trb9+p5cQ9UpIcYLuc35FGMI5fvjj8o6kTmcQqlV73SGSndGfe7gOy6TpdmhwhTiXuybq/lBHa8kxFy/yMrFKGnIj2E5qJA4lqp2l/qa1aZ+6EnFoJXVl5o+oYW/09cW3LkxnsVYxvVGiokVQwArbimGu/2Nx2xpCIM3oLEzgo8o1j1Pf7pzGBZAoizRg22kyrIwvPEuGaVE1AICxVnZYUISN07dxPhVYMQEQoO2TgH94hDTjFeLo9Dgg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2537.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(366004)(396003)(136003)(346002)(376002)(39860400002)(33430700001)(316002)(5660300002)(54906003)(6506007)(478600001)(33440700001)(110136005)(64756008)(66556008)(2906002)(86362001)(66476007)(8676002)(8936002)(53546011)(66446008)(7696005)(55016002)(71200400001)(66946007)(33656002)(4326008)(83320400001)(83280400001)(83310400001)(52536014)(83290400001)(186003)(9686003)(6636002)(26005)(83300400001)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: nGnE5Bt5I90G/1aInuiciRaqyUuXS15IRu+1jPV0CodZbscx/S5B/Vojgdp3w5TVFJZFk78DchhR/UHzTD0P78j6uMueGsS0y3urtrYkbBi1yoRlOCjYGCpGnDRIA24a7zenQN18Er5YTHl7wUInKxUholQNnbJbY4OA7B2ajMt9j6NhpzpvxWsmho45TvHgRN08X5D9dy/KPxoJqmxOIIdJVtdYjxInmk5ICA2mBzmeV3Dl2BDbUbgFisTBFMPUKalbiiwY8Rqbw1gBszEDh1CnQvQSiIqWp3JOOlsJU91gN3WcYnAAjnhDRSW5wSnHbchS57od58VvqCtW7M9IqYd7WdTTHFQGW6hG666tJjU2niTmeRhxTIHvfErHpbo8qB4dF51m4WuOTMiZZN3bKDZ6sySTorqf1bfkO5rdIwPdtP9sjzjfyKrpvLzKUs5JqmU8/HbxcRoSpJUKB2ZS+DF3ch56HzCXkZ5d7EiuyJ3yceVgAeXcrWT7qjKTmCiVtDfP4Ozeao4509hEZT5zjYvJmXE4Q7ex8ew0u5ExMiRgE6/XxasNepz9FNcJ0huamVJqhAE3Rqy5IZ+pFG6dsisM6qMDou0HG0x+ramgTifUZ6SKg0kyH/oZdPpiIE21o2erQcRSKT5b7UTMRdp6e1hwF5zc5g0nhT9T0LnIPkX6CIFT0fh6pXvG9KTmelKo59M0hs7p6t2s7fFrbEYSXT0hHx3vaUUfMA/7hxlPD8w1orRbdirOCX1/z+OordH/VYcu7qodbDnYWvy0xMbfe5kP8ibj39Ng1+XqBymHFM9F+18O7b2clmSI04AfFJ8N Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 912baca2-1c15-4e03-86af-08d7f28becfb X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2020 13:38:28.5607 (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: n6S9xVOZ0YLS7w7I+zuQbvxsZmEGRDp4gztFUSTt6Osyd2DLYeFu7ePm9psTMLWDM9auUxxjGDNefItQYRGOr1bfKSgeMmLn+MsnbXeL5AA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3579 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/5] app/testpmd: print clock with CPU cycles per pkt 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" Hi Dharmik, > -----Original Message----- > From: Dharmik Thakkar > Sent: Wednesday, May 6, 2020 10:59 PM > To: Lu, Wenzhuo ; Wu, Jingjing > ; Iremonger, Bernard > > Cc: dev@dpdk.org; nd@arm.com; Dharmik Thakkar > > Subject: [PATCH 1/5] app/testpmd: print clock with CPU cycles per pkt >=20 > On aarch64 platforms, the cycles are counted using either a low-resolutio= n > generic counter or a high-resolution PMU cycle counter. > Print the clock frequency along with CPU cycles/packet to identify which > cycle counter is being used. >=20 > Signed-off-by: Dharmik Thakkar > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Phil Yang > --- > app/test-pmd/testpmd.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > 99bacddbfdca..9a8cbbd6fc7c 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -1953,11 +1953,12 @@ fwd_stats_display(void) > "%s\n", > acc_stats_border, acc_stats_border); #ifdef > RTE_TEST_PMD_RECORD_CORE_CYCLES > +#define CYC_PER_MHZ 1E6 > if (total_recv > 0) > printf("\n CPU cycles/packet=3D%u (total cycles=3D" > - "%"PRIu64" / total RX packets=3D%"PRIu64")\n", > + "%"PRIu64" / total RX packets=3D%"PRIu64") at %lu MHz > Clock\n", Better to use =3D%"PRIu64" instead of %lu in previous line > (unsigned int)(fwd_cycles / total_recv), > - fwd_cycles, total_recv); > + fwd_cycles, total_recv, (uint64_t)(rte_get_tsc_hz() / > +CYC_PER_MHZ)); > #endif > } >=20 > -- > 2.20.1 Better to fix checkpatch the following checkpatch warning: WARNING:LONG_LINE: line over 80 characters #77: FILE: app/test-pmd/testpmd.c:1961: + fwd_cycles, total_recv, (uint64_t)(rte_get_tsc_hz() = / CYC_PER_MHZ)); Regards, Bernard.