From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 557818EA1 for ; Fri, 22 Jan 2016 16:22:24 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 22 Jan 2016 07:22:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,331,1449561600"; d="scan'208";a="639570604" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jan 2016 07:22:22 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.97]) by IRSMSX108.ger.corp.intel.com ([169.254.11.102]) with mapi id 14.03.0248.002; Fri, 22 Jan 2016 15:22:21 +0000 From: "Van Haaren, Harry" To: Thomas Monjalon , "David Harton (dharton)" Thread-Topic: [dpdk-dev] Future Direction for rte_eth_stats_get() Thread-Index: AdFToifrMKxGpVsMS/qKv8msWpPa2wABEBgwAFcuL6AAA/u1IAACHmaQAAF2QyAAAKFzAAAAQq/Q Date: Fri, 22 Jan 2016 15:22:21 +0000 Message-ID: References: <1A27633A6DA49C4A92FCD5D4312DBF536B09F7A4@IRSMSX106.ger.corp.intel.com> <1670837.tJHuUIkoht@xps13> In-Reply-To: <1670837.tJHuUIkoht@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDI2YWM2ZTgtMTE1ZS00YjAxLTg2NzktMDg0YTQxMmQ1MzIyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjQuMTAuMTkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC81ZTZWMkZ2S0IydmNaWXhjK3dJN1NCZXhYdlpmaUhwVlwvd3doeEJLSEJrPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Future Direction for rte_eth_stats_get() 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, 22 Jan 2016 15:22:24 -0000 > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Subject: Re: [dpdk-dev] Future Direction for rte_eth_stats_get() =20 > + Harry Hey all, > xstats are driver agnostic and have a well-defined naming scheme. Indeed, described here: http://dpdk.org/doc/guides/prog_guide/poll_mode_drv.html#extended-statistic= s-api All of the rte_eth_stats statistics are presented in xstats consistently (independent of which PMD is running), as they are implemented in rte_ethde= v.c: http://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.c#n1500 From: David Harton: > For example, what if there was a kind of "stats registry" composed of ID = and name. It > would work similar to xtats except instead of advertising strings only th= e "get" API would > return ID/count pairs. If the application wishes to use the DPDK provide= d string they can > call another API to get the stat string via the ID. These IDs would be w= ell-defined > clearly explaining what the count represent. This way the strings for co= unts will be > uniform across drivers and also make it clear to the users what the count= s truly represent > and the application could obtain stats from any driver in a driver agnost= ic manner. What you (David Harton) describe about a well-defined name, and clearly exp= laining the value it is representing is what the goal was for xstats: a human readable string= , which can be easily parsed and a value retrieved. The "rules" of encoding a statistic as an xstats string are pretty simple, = and if any PMD breaks the rules, it should be considered broken and fixed. Consistency is key, in this case consistency in the PMD xstats implementati= ons to make it useful for clients of the API. The big advantage xstats has over adding items to rte_eth_stats is that it = won't break ABI. Do you see a fundamental problem with parsing the strings to retrieve value= s? If you like I could code up a minimal sample-app that only pulls statistics= , and you can show "interest" in various statistics for printing / monitoring= ? Regards, -Harry