From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DA56C5A45 for ; Fri, 23 Oct 2015 16:29:38 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 23 Oct 2015 07:29:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,186,1444719600"; d="scan'208";a="833472383" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga002.jf.intel.com with ESMTP; 23 Oct 2015 07:29:37 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.139]) by irsmsx110.ger.corp.intel.com ([169.254.15.151]) with mapi id 14.03.0248.002; Fri, 23 Oct 2015 15:29:36 +0100 From: "Tahhan, Maryam" To: "Van Haaren, Harry" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 02/11] doc: add extended statistics to prog_guide Thread-Index: AQHRDOFHk5HOjICpP02Mvu2r+lrrHp55JHvw Date: Fri, 23 Oct 2015 14:29:35 +0000 Message-ID: <1A27633A6DA49C4A92FCD5D4312DBF536A5D9398@IRSMSX109.ger.corp.intel.com> References: <1443606022-13581-2-git-send-email-harry.van.haaren@intel.com> <1445528914-27636-1-git-send-email-harry.van.haaren@intel.com> <1445528914-27636-3-git-send-email-harry.van.haaren@intel.com> In-Reply-To: <1445528914-27636-3-git-send-email-harry.van.haaren@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 02/11] doc: add extended statistics to prog_guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2015 14:29:39 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Harry van Haaren > Sent: Thursday, October 22, 2015 4:48 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v3 02/11] doc: add extended statistics to > prog_guide >=20 > 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. >=20 > Signed-off-by: Harry van Haaren > --- > doc/guides/prog_guide/poll_mode_drv.rst | 51 > ++++++++++++++++++++++++++++++++- > 1 file changed, 50 insertions(+), 1 deletion(-) >=20 > diff --git a/doc/guides/prog_guide/poll_mode_drv.rst > b/doc/guides/prog_guide/poll_mode_drv.rst > index 8780ba3..44cc9ce 100644 > --- a/doc/guides/prog_guide/poll_mode_drv.rst > +++ b/doc/guides/prog_guide/poll_mode_drv.rst > @@ -1,5 +1,5 @@ > .. BSD LICENSE > - Copyright(c) 2010-2014 Intel Corporation. All rights reserved. > + Copyright(c) 2010-2015 Intel Corporation. All rights reserved. > All rights reserved. >=20 > Redistribution and use in source and binary forms, with or without @= @ - > 294,3 +294,52 @@ Ethernet Device API ~~~~~~~~~~~~~~~~~~~ >=20 > The Ethernet device API exported by the Ethernet PMDs is described in th= e > *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 schem= e is > as follows: > + > +* direction > +* detail 1 > +* detail 2 > +* detail n > +* unit > + > +Examples of common statistics xstats strings, formatted to comply to > +the scheme proposed above: > + > +* ``rx_bytes`` > +* ``rx_crc_errors`` > +* ``tx_multicast_packets`` > + > +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 measur= e 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 p= acket > 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 Acked-by: Maryam Tahhan