DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harry van Haaren <harry.van.haaren@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 02/11] doc: add extended statistics to prog_guide
Date: Tue, 29 Sep 2015 15:32:46 +0100	[thread overview]
Message-ID: <1443537175-13809-3-git-send-email-harry.van.haaren@intel.com> (raw)
In-Reply-To: <1443537175-13809-1-git-send-email-harry.van.haaren@intel.com>

Add extended statistic section to the programmers
guide, poll mode driver section. This section describes
how the strings stats are formatted, and how the client
code can use this to gather information about the stat.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 doc/guides/prog_guide/poll_mode_drv.rst | 42 +++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
index 8780ba3..436e42a 100644
--- a/doc/guides/prog_guide/poll_mode_drv.rst
+++ b/doc/guides/prog_guide/poll_mode_drv.rst
@@ -294,3 +294,45 @@ Ethernet Device API
 ~~~~~~~~~~~~~~~~~~~
 
 The Ethernet device API exported by the Ethernet PMDs is described in the *DPDK API Reference*.
+
+Extended Statistics API
+~~~~~~~~~~~~~~~~~~~~~~~
+
+The extended statistics API allows each individual PMD to expose a unique set
+of statistics. The client of the API provides an array of
+``struct rte_eth_xstats`` type. Each ``struct rte_eth_xstats`` contains a
+string and value pair. The amount of xstats exposed, and position of the
+statistic in the array must remain constant during runtime.
+
+A naming scheme exists for the strings exposed to clients of the API. This is
+to allow scraping of the API for statistics of interest. The naming scheme uses
+strings split by a single underscore ``_``. The scheme is as follows:
+
+* direction
+* detail 1
+* detail 2
+* detail n
+* unit
+
+The scheme, although quite simple, allows flexibility in presenting and reading
+information from the statistic strings. The following example illustrates the
+naming scheme:``rx_packets``. In this example, the string is split into two
+components. The first component ``rx`` indicates that the statistic is
+associated with the receive side of the NIC.  The second component ``packets``
+indicates that the unit of measure is packets.
+
+A more complicated example: ``tx_size_128_to_255_packets``. In this example,
+``tx`` indicates transmission, ``size``  is the first detail, ``128`` etc are
+more details, and ``packets`` indicates that this is a packet counter.
+
+Some additions in the metadata scheme are as follows:
+
+* If the first part does not match ``rx`` or ``tx``, the statistic does not
+  have an affinity with either recieve of transmit.
+
+* If the first letter of the second part is ``q`` and this ``q`` is followed
+  by a number, this statistic is part of a specific queue.
+
+An example where queue numbers are used is as follows: ``tx_q7_bytes`` which
+indicates this statistic applies to queue number 7, and represents the number
+of transmitted bytes on that queue.
-- 
1.9.1

  parent reply	other threads:[~2015-09-29 14:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 14:32 [dpdk-dev] [PATCH 00/11] Port XStats Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 01/11] doc: add extended statistics notes Harry van Haaren
2015-09-29 14:32 ` Harry van Haaren [this message]
2015-09-29 14:32 ` [dpdk-dev] [PATCH 03/11] ethdev: update xstats_get() strings and Q handling Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 04/11] virtio: add xstats() implementation Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 05/11] igb: " Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 06/11] igbvf: " Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 07/11] ixgbe: update statistic strings to scheme Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 08/11] ixgbevf: add xstats() functions to VF Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 09/11] i40e: add xstats() implementation Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 10/11] i40evf: " Harry van Haaren
2015-09-29 14:32 ` [dpdk-dev] [PATCH 11/11] fm10k: " Harry van Haaren

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=1443537175-13809-3-git-send-email-harry.van.haaren@intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=dev@dpdk.org \
    /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).