DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: dev@dpdk.org, jingjing.wu@intel.com
Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: print statistics periodically
Date: Mon, 19 Jun 2017 23:22:06 +0200	[thread overview]
Message-ID: <9249424.xGZGaBmtM9@xps> (raw)
In-Reply-To: <20170615014817.12543-1-pablo.de.lara.guarch@intel.com>

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.

  parent reply	other threads:[~2017-06-19 21:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 21:38 [dpdk-dev] [PATCH] " Pablo de Lara
2017-06-07  9:11 ` Wu, Jingjing
2017-06-07 13:13   ` De Lara Guarch, Pablo
2017-06-09  1:46 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2017-06-15  1:48   ` [dpdk-dev] [PATCH v3] " Pablo de Lara
2017-06-19  1:05     ` Wu, Jingjing
2017-06-19 21:22     ` Thomas Monjalon [this message]
2017-06-20  8:34       ` De Lara Guarch, Pablo
2017-07-05 23:51         ` Thomas Monjalon
2017-07-06  9:56           ` De Lara Guarch, Pablo
2017-07-06  1:52     ` [dpdk-dev] [PATCH v4] " Pablo de Lara
2017-07-06  3:05       ` [dpdk-dev] [PATCH v5] " Pablo de Lara
2017-07-06 14:20         ` Thomas Monjalon
2017-07-06 10:06       ` [dpdk-dev] [PATCH v4] " Jerin Jacob
2017-07-06 10:43         ` De Lara Guarch, Pablo
2017-07-06 10:16       ` Thomas Monjalon
2017-07-06 10:19         ` De Lara Guarch, Pablo
2017-06-19  0:54   ` [dpdk-dev] [PATCH v2] " Wu, Jingjing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9249424.xGZGaBmtM9@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).