DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Dharmik Thakkar <dharmik.thakkar@arm.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>
Cc: dev@dpdk.org, nd@arm.com
Subject: Re: [dpdk-dev] [PATCH v2 3/5] doc: add cycles per packet in testpmd user guide
Date: Fri, 15 May 2020 13:15:19 +0100	[thread overview]
Message-ID: <d9be2681-b375-bf6e-e44d-144b870d1a5f@intel.com> (raw)
In-Reply-To: <20200508223829.3228-3-dharmik.thakkar@arm.com>

On 5/8/2020 11:38 PM, Dharmik Thakkar wrote:
> Update documentation for 'show fwd' testpmd runtime function to show
> CPU cycles/packet example.
> 
> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Phil Yang <phil.yang@arm.com>
> ---
> v2:
>  - Use shorter lines, up to 100.
> ---
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst | 53 +++++++++++++--------
>  1 file changed, 33 insertions(+), 20 deletions(-)
> 
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index a360ecccfd3f..441ed41e3803 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -351,26 +351,39 @@ Example for the io forwarding engine, with some packet drops on the tx side::
>  
>     testpmd> show fwd stats all
>  
> -     ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 1/Queue= 0 -------
> -     RX-packets: 274293770      TX-packets: 274293642      TX-dropped: 128
> -
> -     ------- Forward Stats for RX Port= 1/Queue= 0 -> TX Port= 0/Queue= 0 -------
> -     RX-packets: 274301850      TX-packets: 274301850      TX-dropped: 0
> -
> -     ---------------------- Forward statistics for port 0  ----------------------
> -     RX-packets: 274293802      RX-dropped: 0             RX-total: 274293802
> -     TX-packets: 274301862      TX-dropped: 0             TX-total: 274301862
> -     ----------------------------------------------------------------------------
> -
> -     ---------------------- Forward statistics for port 1  ----------------------
> -     RX-packets: 274301894      RX-dropped: 0             RX-total: 274301894
> -     TX-packets: 274293706      TX-dropped: 128           TX-total: 274293834
> -     ----------------------------------------------------------------------------
> -
> -     +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
> -     RX-packets: 548595696      RX-dropped: 0             RX-total: 548595696
> -     TX-packets: 548595568      TX-dropped: 128           TX-total: 548595696
> -     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +     ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 1/Queue= 0 -------
> +     RX-packets: 43536504       TX-packets: 43536488       TX-dropped: 0
> +
> +     ------- Forward Stats for RX Port= 1/Queue= 0 -> TX Port= 0/Queue= 0 -------
> +     RX-packets: 149738504      TX-packets: 149738504      TX-dropped: 0
> +
> +     ------- Forward Stats for RX Port= 1/Queue= 1 -> TX Port= 0/Queue= 1 -------
> +     RX-packets: 149753052      TX-packets: 149753052      TX-dropped: 0
> +
> +     ---------------------- Forward statistics for port 0  ----------------------
> +     RX-packets: 43538881       RX-dropped: 72            RX-total: 43538953
> +     TX-packets: 299491753      TX-dropped: 0             TX-total: 299491753
> +     ----------------------------------------------------------------------------
> +
> +     ---------------------- Forward statistics for port 1  ----------------------
> +     RX-packets: 299493085      RX-dropped: 8357          RX-total: 299501442
> +     TX-packets: 43539683       TX-dropped: 0             TX-total: 43539683
> +     ----------------------------------------------------------------------------
> +
> +     +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
> +     RX-packets: 343031966      RX-dropped: 8429          RX-total: 343040395
> +     TX-packets: 343031436      TX-dropped: 0             TX-total: 343031436
> +     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +
> +     CPU cycles/packet=14.28 (total cycles=4899533541 / total RX packets=343031966) at 200 MHz Clock

Hi Dharmik,

Overall it is OK to show "CPU cycles/packet", but my concern is numbers can be
misleading, because for example the numbers I am getting is like below:

CPU cycles/packet=4.38 (total cycles=32871036274 / total RX packets=7511734336)
at 2100 MHz Clock

> +
> +.. note::
> +
> +   Measuring CPU cycles/packet requires enabling CONFIG_RTE_TEST_PMD_RECORD_CORE_TX_CYCLES

s/TX_CYCLES/CYCLES

> +   configuration option. On aarch64 platforms, by default, the cycles are counted using
> +   generic counter which runs at a lower frequency than the CPU clock. To get the cycles/packet
> +   at CPU clock frequency, please scale the cycles/packet to CPU clock frequency.
> +   Alternatively, use the PMU based cycle counter.

Not sure the "aarch64 platforms" note suits to here, where documents the
command. And I can see the platform documentation already updated for this.

Combining above two comments, what do you think instead of replacing existing
stats, add a note saying enabling 'CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES'
appends "CPU cycles/packet" and give above two samples, like:

"
Enabling RTE_TEST_PMD_RECORD_CORE_CYCLES appends "CPU cycles/packet" stats, like:

CPU cycles/packet=4.38 (total cycles=32871036274 / total RX packets=7511734336)
at 2100 MHz Clock
OR
CPU cycles/packet=14.28 (total cycles=4899533541 / total RX packets=343031966)
at 200 MHz Clock
"

  parent reply	other threads:[~2020-05-15 12:15 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200506215939eucas1p1fd98a671dda83adf884c30d7bf9b77c4@eucas1p1.samsung.com>
2020-05-06 21:58 ` [dpdk-dev] [PATCH 1/5] app/testpmd: print clock with CPU cycles per pkt Dharmik Thakkar
2020-05-06 21:58   ` [dpdk-dev] [PATCH 2/5] app/testpmd: print fractional part in CPU cycles Dharmik Thakkar
2020-05-07  9:50     ` Ananyev, Konstantin
2020-05-07 22:16       ` Dharmik Thakkar
2020-05-08 17:17         ` Ananyev, Konstantin
2020-05-08 17:36           ` Dharmik Thakkar
2020-05-08 18:08             ` Ananyev, Konstantin
2020-05-06 21:58   ` [dpdk-dev] [PATCH 3/5] doc: add cycles per packet in testpmd user guide Dharmik Thakkar
2020-05-07  5:24     ` Jerin Jacob
2020-05-07 22:27       ` Dharmik Thakkar
2020-05-07 14:30     ` Iremonger, Bernard
2020-05-06 21:58   ` [dpdk-dev] [PATCH 4/5] doc: include config options " Dharmik Thakkar
2020-05-07 14:42     ` Iremonger, Bernard
2020-05-06 21:58   ` [dpdk-dev] [PATCH 5/5] doc: add aarch64 generic counter section Dharmik Thakkar
2020-05-07  5:17     ` Jerin Jacob
2020-05-06 22:48   ` [dpdk-dev] [PATCH 1/5] app/testpmd: print clock with CPU cycles per pkt Lukasz Wojciechowski
2020-05-07 13:38   ` Iremonger, Bernard
2020-05-08 22:38   ` [dpdk-dev] [PATCH v2 " Dharmik Thakkar
2020-05-08 22:38     ` [dpdk-dev] [PATCH v2 2/5] app/testpmd: print fractional part in CPU cycles Dharmik Thakkar
2020-05-12 10:19       ` Iremonger, Bernard
2020-05-08 22:38     ` [dpdk-dev] [PATCH v2 3/5] doc: add cycles per packet in testpmd user guide Dharmik Thakkar
2020-05-12 10:20       ` Iremonger, Bernard
2020-05-15 12:15       ` Ferruh Yigit [this message]
2020-05-15 20:33         ` Dharmik Thakkar
2020-05-18  9:47           ` Ferruh Yigit
2020-05-18 21:49             ` Dharmik Thakkar
2020-05-19  8:27               ` Ferruh Yigit
2020-05-20  3:20       ` [dpdk-dev] [PATCH v3 1/2] " Dharmik Thakkar
2020-05-20  3:20         ` [dpdk-dev] [PATCH v3 2/2] doc: include config options " Dharmik Thakkar
2020-06-17 18:21           ` Ferruh Yigit
2020-06-17 19:48             ` Thomas Monjalon
2020-06-19 15:38               ` Dharmik Thakkar
2020-06-19 15:43                 ` Thomas Monjalon
2020-06-19 16:13                   ` Dharmik Thakkar
2020-06-22 15:26                     ` Thomas Monjalon
2020-06-29 14:25                       ` Dharmik Thakkar
2020-07-14 21:51           ` [dpdk-dev] [PATCH 0/6] app/testpmd: add runtime config Dharmik Thakkar
2020-07-14 21:51             ` [dpdk-dev] [PATCH 1/6] app/testpmd: add record-core-cycles " Dharmik Thakkar
2020-07-14 21:51             ` [dpdk-dev] [PATCH 2/6] doc: add record-core-cycles to testpmd funcs doc Dharmik Thakkar
2020-07-14 21:51             ` [dpdk-dev] [PATCH 3/6] app/testpmd: add record-burst-stats runtime config Dharmik Thakkar
2020-07-14 21:51             ` [dpdk-dev] [PATCH 4/6] doc: add record-burst-stats to testpmd funcs doc Dharmik Thakkar
2020-07-14 21:51             ` [dpdk-dev] [PATCH 5/6] app/testpmd: enable burst stats for noisy vnf mode Dharmik Thakkar
2020-07-14 21:51             ` [dpdk-dev] [PATCH 6/6] app/testpmd: enable empty polls in 5tswap Dharmik Thakkar
2020-07-15  4:29               ` Phil Yang
2020-08-26 16:33             ` [dpdk-dev] [PATCH 0/6] app/testpmd: add runtime config Ferruh Yigit
2020-08-26 16:41               ` Bruce Richardson
2020-08-26 17:07                 ` Dharmik Thakkar
2020-08-26 22:06                   ` Ferruh Yigit
2020-09-10 15:06                     ` Ferruh Yigit
2020-08-26 21:24                 ` Ferruh Yigit
2020-05-20 14:49         ` [dpdk-dev] [PATCH v3 1/2] doc: add cycles per packet in testpmd user guide Ferruh Yigit
2020-05-21 17:41           ` Ferruh Yigit
2020-05-08 22:38     ` [dpdk-dev] [PATCH v2 4/5] doc: include config options " Dharmik Thakkar
2020-05-12 10:20       ` Iremonger, Bernard
2020-05-19  7:42         ` Thomas Monjalon
2020-05-19 22:58           ` Dharmik Thakkar
2020-05-20  7:53             ` Thomas Monjalon
2020-05-20 22:39               ` Dharmik Thakkar
2020-05-19  7:45       ` Thomas Monjalon
2020-05-08 22:38     ` [dpdk-dev] [PATCH v2 5/5] doc: add aarch64 generic counter section Dharmik Thakkar
2020-05-12 10:18     ` [dpdk-dev] [PATCH v2 1/5] app/testpmd: print clock with CPU cycles per pkt Iremonger, Bernard
2020-05-15 12:23     ` Ferruh Yigit

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=d9be2681-b375-bf6e-e44d-144b870d1a5f@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=dharmik.thakkar@arm.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=nd@arm.com \
    --cc=wenzhuo.lu@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).