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 <ferruh.yi...@intel.com> > --- > Cc: Ivan Malov <ivan.ma...@oktetlabs.ru> > Cc: Harry Van Haaren <harry.van.haa...@intel.com> > Cc: Lee Daly <lee.d...@intel.com>
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 <ivan.ma...@oktetlabs.ru> Tested-by: Ivan Malov <ivan.ma...@oktetlabs.ru> -- Best regards, Ivan