From: Ivan Malov Subject: Re: [PATCH 2/3] ethdev: fix xstats get by id APIS Date: Fri, 20 Oct 2017 15:33:28 +0300 Message-ID: <20171020123328.GB26729@oktetlabs.ru> References: <20171020000351.57868-1-ferruh.yigit@intel.com> <20171020000351.57868-2-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Thomas Monjalon , Harry Van Haaren , Lee Daly To: Ferruh Yigit , dev@dpdk.org Return-path: Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [84.52.114.115]) by dpdk.org (Postfix) with ESMTP id 6441E1B233 for ; Fri, 20 Oct 2017 14:33:32 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20171020000351.57868-2-ferruh.yigit@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" On Fri, Oct 20, 2017 at 01:03:50AM +0100, Ferruh Yigit wrote: > ethdev xstat get by id APIs: > rte_eth_xstats_get_names_by_id() > rte_eth_xstats_get_by_id() > > Works on ids calculated as "basic stats + device specific stats" > > When an application asking for id less than "basic stats count", it is > indeed asking basic stats nothing specific to device stats. > > The dev_ops PMDs implements xstats_get_names_by_id and xstats_get_by_id > works on device specific ids. > > This patch adds a check if all stats requested by ids can be provided > via device and if so converts ids to device specific ones. > > This conversion wasn't required before commit 8c49d5f1c219, because > _by_id dev_ops were always used to get whole stats instead of specific > ids. > > Fixes: 8c49d5f1c219 ("ethdev: rework xstats retrieve by id") > > Signed-off-by: Ferruh Yigit > --- > Cc: Ivan Malov > Cc: Harry Van Haaren > Cc: Lee Daly The patch looks reasonable. It solves the problem for me provided that the parts 1/3 and 3/3 are also applied. Reviewed-by: Ivan Malov Tested-by: Ivan Malov -- Best regards, Ivan