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 472D9A00C5; Thu, 7 May 2020 11:51:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87AF61DB3C; Thu, 7 May 2020 11:51:02 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AA5ED1BF80 for ; Thu, 7 May 2020 11:51:00 +0200 (CEST) IronPort-SDR: XYXc0J7ewkmcoRd+t8I2cNcMpt5sX1iXZibbFHqeItINUjtaRgr/uvCT/ad8FM19/RX57iTQAt XVNivJcryUhg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 02:50:59 -0700 IronPort-SDR: tJNGhIfyP3E5nAoeWH0qSb5RSuKLUajMaWp7RajyUN/y0k/0vXG/4PcuaVZi2hC6l44bsF7rg3 5sNCkyK4BUKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,363,1583222400"; d="scan'208";a="249227284" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga007.jf.intel.com with ESMTP; 07 May 2020 02:50:59 -0700 Received: from orsmsx151.amr.corp.intel.com (10.22.226.38) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 02:50:59 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX151.amr.corp.intel.com (10.22.226.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 02:50:58 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 02:50:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ngJvlo/+j3bJA9sLQLyOhDpZolcl5mQictM49aGrwmuUJff6nSog5bRcsHT+V6r3Ny4Pgva4RaFEXCEw9ECHOsDXnVRGfoJrWGxUOL8KY0zwNoEsYhJLpa5QqO4fnGM86sOHjgE1rXk468np5dC9/GWt2e3aBIlAQ1c25qIa7MZ3xFmPfN10GSGcGOVUMNLRMwlWrBBaw8yZ4rMi9zxppNl0z/fS8ocJQ6gsuLdjWzWzWu1fVO94Rf9flIXB+PFjftHEuJZRsB45Fy52akvxZxnJ4etyf9t1F1FCiBwce/M8udCWeRrN4GB2wqGMQ5DIPvZ9eWrkXsouyScTkq8EMQ== 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=mcinzT3wN4pRbDGJ8mjywWVvAvvytX1OlRcplWe2HGs=; b=IP8yWle/wsb+EoCn8ksPkfMoLxjai4WRStOh6P1id4n1+D7h3cCShOsyswyE0pbpohWjsQ7rd/jTVBMQPCE07RQcmjzHLEGNtRr8SX0IC4fcWTXh0Ows3o6pQEZ9T2YyreMKhMJXuC78lpIq0UPMK9ZvQ8GxYfIIN1oyXfijpWvtyC8HkoXcTDnbNzAQBLBuNBYytasw8mN4cg2sbv0Vq40M2+80xlpvdpZc+jOseNvWV/OAG5vLckDSX2WTO1Ms0gs75HHhUbEDe3ryF7iC7u/2XVPhoSf5qLCyV+Hjfwo5sjh1BfVioDsco5ijAJWRvbQSgSAwyPT63jye7XruPA== 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=mcinzT3wN4pRbDGJ8mjywWVvAvvytX1OlRcplWe2HGs=; b=yEKhFaSBUtIETrwF9jSwbStIhURMzZNNkueHMkB4gyHbqpul0XOODIYsf21jNSr9FRGdlFRlqL6IscSpEKV0QQwDcyLFTcbda5QhnvgFm1t3Exdd8S3g6AR9Y36h+vGbpxmA8l+R0z0MqsP3Me9YXJzc3vnLsaBsD3uKLcaIN/8= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB3304.namprd11.prod.outlook.com (2603:10b6:a03:7a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.29; Thu, 7 May 2020 09:50:56 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4%6]) with mapi id 15.20.2958.030; Thu, 7 May 2020 09:50:56 +0000 From: "Ananyev, Konstantin" To: Dharmik Thakkar , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" CC: "dev@dpdk.org" , "nd@arm.com" Thread-Topic: [dpdk-dev] [PATCH 2/5] app/testpmd: print fractional part in CPU cycles Thread-Index: AQHWI/G+RUZsDDsVTkuih2YloYzM26icYeiw Date: Thu, 7 May 2020 09:50:56 +0000 Message-ID: References: <20200506215847.7628-1-dharmik.thakkar@arm.com> <20200506215847.7628-2-dharmik.thakkar@arm.com> In-Reply-To: <20200506215847.7628-2-dharmik.thakkar@arm.com> Accept-Language: en-GB, 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: 2cb69b2d-cc93-49c1-7a11-08d7f26c237f x-ms-traffictypediagnostic: BYAPR11MB3304: 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:549; x-forefront-prvs: 03965EFC76 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3IzagMszjuDH+CBo0YpGWaTwYUFPBMBSGhNcYg9IBoAW1+ZolhNu/2L41yKTRU66H+deU+FcgVxc+VBFLeiE2mRLtPZ1lnf9r6Da8WvAOGwqnIWXetTdXgDJJnFiFkdyq0rYXe+LiwagOhWOcu8LkiS6uSjzfnaQCfk3MNK+RqlmgOpxeUdzGTfc+bSU8u9Bwa02B4pohMKotxWitjFM9qupHUqBaQ5A648LEx5DP/u2wuaZY8ru30F70PfyDl7T21tHIqpdH9N+f7VsB/cdMZ2mISJtgHLP9KTFCi+t+t4aQJ25NjTsDzkhexuXhT5vt8xtQmcnre7nTkU7Jjt1j/QhUJOL+urj8w7ENfLHjRQY36/BzBoqlYQ/hmVOUIVR8tsjc8dBHVXGEq+CAob+k3GeZV4MaBYTJm+kIY3Cr0ie8quVNSmLw+1JCbiH2BHuVnRHrdzXfSWYh5SyAvd9nd93R94LlBiGC59YIxCHgNi38A2uXP97qydwrSJhWgoIIyj5x2xEA100mBsCmjkTGA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(396003)(366004)(136003)(376002)(39860400002)(346002)(33430700001)(66946007)(55016002)(76116006)(64756008)(66446008)(66556008)(52536014)(110136005)(26005)(9686003)(2906002)(6506007)(66476007)(86362001)(7696005)(83290400001)(8936002)(83300400001)(83320400001)(83280400001)(83310400001)(33656002)(53546011)(33440700001)(478600001)(316002)(186003)(54906003)(4326008)(5660300002)(71200400001)(6636002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: oPpUeaaGl2i3UABGU6QK3X1wsfhdQEH2BrfGv/T+mdNLrf9MBU6k/+j4VbCVeh7tVXDxXL2bUuzFYSPEh8ldYdiS9CYZupQfj7B1GSIn9fY2xocmYOBcUFCOoO7qscO6Ay8wKaFeNMvJIT7dkXxV5n3SWWj1egKBwc+JhA7jmxasq5MSGADoJt395Bq8l9q6OaL9K3Hi5061cGiW2VAxIWoRJTIId0Stk87r6d29sqZE74eEpB9Km0iJvFU1CarwZKeekU26eex+svDrdI8Hk4PsLPMXqZ/9G19SuguW0KOoDu0VXfobp07KJLVW+11GUD16rGtm8iLi29uJ/xJ0UOAMkyZbcE1aPk3Vct4GOjtVJiTxAih0G4DpQXG76YrklvIFFA6F4aHW5fee7M+QR0TP1Z2LaIdVEEZE7fP7SLOXmoDdzrJq8ahTvFRHT5HvZUfaNz8jRygZg+d536uNy2BDMtbw2juTGOgi1P8w999DSDUrXgFGzgVyDmXOFzvU5wn6tZ3jQMnU9kbsKmqUiYKNRw2WJMqUMu55K29n38RGVrQ4c0z2tZPj4lmcbwkTSu9Ub3skKyUH4nQQwEvkxPXgzdDDfYvZ1+MWVZsoP70+ScWQQyLQqAhAwl8hV/fQtKiaczHFv6AOC1GgQMilxVEP7w2pOniyj9AjqX3Zm0yYToMDB8T7SPUU9sWqrCM4QU3J7pDPHHp1wfpRMTDJ8QMbu4ELXtKHMrehFGP0KwpkR2TRm6NJ0sj8F2Qocb975MbtiQmPUlgHu4REwek28j4rGztdHF3ECaicTndgGYgdNKyUBReQmg932zvfQLSd Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2cb69b2d-cc93-49c1-7a11-08d7f26c237f X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2020 09:50:56.0991 (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: TwVLoHecQU4TAmfDUq6rjbUffV6J43tVT3I01DvFuNBGRZt9t++zgQyOp+YrSu0AfGL237IuzByCtIYs3vNvZHbYHlVYHC0HflCz0iuwI+E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3304 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/5] app/testpmd: print fractional part in CPU cycles 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" > -----Original Message----- > From: dev On Behalf Of 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: [dpdk-dev] [PATCH 2/5] app/testpmd: print fractional part in CPU= cycles >=20 > Change printing of CPU cycles/packet to include fractional part for > accurateness. >=20 > Example: >=20 > Without patch: > CPU cycles/packet=3D14 > (total cycles=3D4899533541 / total RX packets=3D343031966) >=20 > With patch: > CPU cycles/packet=3D14.28 > (total cycles=3D4899533541 / total RX packets=3D343031966) >=20 > Signed-off-by: Dharmik Thakkar > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Phil Yang > --- > app/test-pmd/testpmd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 9a8cbbd6fc7c..9444a730a153 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -1955,9 +1955,9 @@ fwd_stats_display(void) > #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" > + printf("\n CPU cycles/packet=3D%.2f (total cycles=3D" > "%"PRIu64" / total RX packets=3D%"PRIu64") at %lu MHz Clock\n", > - (unsigned int)(fwd_cycles / total_recv), > + (double)(fwd_cycles / (double)total_recv), Probably safer long double - to avoid overflow.=20 > fwd_cycles, total_recv, (uint64_t)(rte_get_tsc_hz() / CYC_PER_M= HZ)); > #endif > } > -- > 2.20.1