From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 91364968 for ; Mon, 19 Jun 2017 23:22:09 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EFC6B20AD1; Mon, 19 Jun 2017 17:22:07 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 19 Jun 2017 17:22:07 -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=cWw8Jo3zqAtQ0rd p2fw/IGKH1e6qxknkX9rrG8QWcFA=; b=Oa6EcGgSZiCQhtQVFPYGPWIBfsjyf36 hye5iGBE9cGGJib7jbesFne2GcRlHvMtWSmrfdiRj7fer2fPI6tmsJp0w6tqBuD1 twKMRjeZPzUnMTV9wx1irf6XpwjkbyXmOBcwd9vK2plRehe7Q8DFtsqWqgY0fO3J A5KrWl7fre70= 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=cWw8Jo3zqAtQ0rdp2fw/IGKH1e6qxknkX9rrG8QWcFA=; b=phStcGXG fJKxBiLXQ5kByR0aLNvi1H30843S/+awtzVwbQBZkYBUXD+LcgtdnSPRvF8AmQUj hSMXYBqFSG4klS739kS/oVTVKPjm2HoC1LsykaMbyAFW5Z2OLnAGHF2VcQNAw0C8 0dm9N7BOiqk6qqrDBIIER5fFRkgUX+S2OrxHe0mTfnXxN7KsairJkGOkLrZOoLIL yQqp3lpGAuYAibGin9OXM54FM62AA4vlT1tmivgQkjXERxAzAtBKoyKlH9N1YYOI cUKM6EENcqHqnVIc+sPsMTkIEn+3nA5y3ffdyzRn1sB15+Cr+Z9z7NyNhsbs92ih SI7hRhNgzaKZQg== X-ME-Sender: X-Sasl-enc: xg19gUtoVY13pJHzPm5p3Yvhw57/0D1b/WI+wDAqb+e8 1497907327 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A64B4248E3; Mon, 19 Jun 2017 17:22:07 -0400 (EDT) From: Thomas Monjalon To: Pablo de Lara Cc: dev@dpdk.org, jingjing.wu@intel.com Date: Mon, 19 Jun 2017 23:22:06 +0200 Message-ID: <9249424.xGZGaBmtM9@xps> In-Reply-To: <20170615014817.12543-1-pablo.de.lara.guarch@intel.com> References: <20170609014656.27396-1-pablo.de.lara.guarch@intel.com> <20170615014817.12543-1-pablo.de.lara.guarch@intel.com> 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: Mon, 19 Jun 2017 21:22:09 -0000 15/06/2017 03:48, Pablo de Lara: > +print_stats(void) > +{ > + uint8_t i; > + const char clr[] = { 27, '[', '2', 'J', '\0' }; > + const char topLeft[] = { 27, '[', '1', ';', '1', 'H', '\0' }; Spotted a CamelCase ;) Is there a punishment planned in the contributor's guide? > + 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.