From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] ether: fix incorrect stats query for lowest xstat id Date: Tue, 06 Feb 2018 18:46:14 +0100 Message-ID: <2897371.3Us8B8FbjR@xps> References: <20180206160659.87323-1-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Bruce Richardson Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id BC16E1B685 for ; Tue, 6 Feb 2018 18:46:18 +0100 (CET) In-Reply-To: <20180206160659.87323-1-bruce.richardson@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 06/02/2018 17:06, Bruce Richardson: > When querying either the name or the value of a stat using the xstats > APIs, a check is done to see if the regular stats API or the xstats APIs > for the driver need to be used. However, the id of the stat requested is > checked to see if it is greater than the number of basic stats, rather > than checking for greater-or-equal, meaning that the xstat with the lowest > id gets incorrectly treated as a basic stat. > > This problem manifests itself when you call proc_info using "--xstats-id" > for the first xstat, you get no name of the stat printed, and a random(ish) > stat value. > > Fixes: 4773152f850b ("ethdev: optimize xstats by ids APIs") > > Signed-off-by: Bruce Richardson Applied, thanks It looks like the stats functions are the most reworked and fixed. It is a no-end story. According to git statistics, it is probably the most complicate code of DPDK :) I am thinking about being more conservative and do not accept any new change in these rocket science functions ;)