From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id E68B12C8 for ; Thu, 6 Jul 2017 01:51:41 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 77AB420A42; Wed, 5 Jul 2017 19:51:41 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 05 Jul 2017 19:51:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=AFX5lK2BUwGdw8B OEVXtfROqQJlIj43AyBHyAiO3qmY=; b=A6tRTpky23aBD04ypm+qEStXvnLHXjG +kbXzk2/Mc2rdsydbYfbg2ccl/1P9lEV+HDxGN7D+60AmiVHZRjc8u4Fbcqydg/T cnltoWprMg3V3eoyXfOTE3ZjOBxSIjjfqKTGiExRhVK3Hlf+lCCV2DF25z86yION QOSb+D2asrpc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=AFX5lK2BUwGdw8BOEVXtfROqQJlIj43AyBHyAiO3qmY=; b=h6tB/t0n Ehi5IIrmKIJoFzjZKzhnwnwCWuVYoo1vG6MMBbnOPOdP54XAeYvnmZgnQvgiXNd3 1IAFnd5bZGvw46n9uEVEDtJ4Ql6yNg5GL2IebHRbHs4F5GCHeB1whzQb/J1LQfU0 O7zSppOcPuDPOYWVxeyQsURtK2GwcuNvpaBUk0H5+BdrRIaQ69T9Aoc9cYR3oZY/ hRTImiSGgWxz21E5YlYXV4dH/X5zmHDDQxEBk/F15/wTVbGni45U+imaIruHq+Lh nAtP6sgrcMoipLiDRh6hFcRx2WggTWukLW4JZQw+C2Fsi+Mxvn90w0g5WZszOzF1 baKujtF1ioafBg== X-ME-Sender: X-Sasl-enc: C8e9qyJI0ESJGFq9lSWaa1Bg9TRSPqFzHCT32lCxFYI+ 1499298701 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2BC0124251; Wed, 5 Jul 2017 19:51:41 -0400 (EDT) From: Thomas Monjalon To: "De Lara Guarch, Pablo" Cc: dev@dpdk.org, "Wu, Jingjing" Date: Thu, 06 Jul 2017 01:51:40 +0200 Message-ID: <2035419.FSHShSjrGD@xps> In-Reply-To: References: <20170609014656.27396-1-pablo.de.lara.guarch@intel.com> <9249424.xGZGaBmtM9@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: print statistics periodically 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: , X-List-Received-Date: Wed, 05 Jul 2017 23:51:42 -0000 20/06/2017 10:34, De Lara Guarch, Pablo: > > > + if (stats_period != 0) { > > > + uint64_t prev_tsc = 0, cur_tsc, timer_tsc = 0; > > > + uint64_t timer_period; > > > + > > > + /* Convert to number of cycles */ > > > + timer_period = stats_period * rte_get_timer_hz(); > > > + > > > + while (1) { > > > + cur_tsc = rte_rdtsc(); > > > + timer_tsc += cur_tsc - prev_tsc; > > > > Please forget (Intel) TSC wording and prefer the more generic > > rte_get_timer_cycles() function. > > Good point, will fix in the v4. Waiting for v4.