[dpdk-dev] [PATCH 2/3] ethdev: fix xstats get by id APIS

Ivan Malov Ivan.Malov at oktetlabs.ru
Fri Oct 20 14:33:28 CEST 2017


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.yigit at intel.com>
> ---
> Cc: Ivan Malov <Ivan.Malov at oktetlabs.ru>
> Cc: Harry Van Haaren <harry.van.haaren at intel.com>
> Cc: Lee Daly <lee.daly at 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.malov at oktetlabs.ru>
Tested-by: Ivan Malov <ivan.malov at oktetlabs.ru>

-- 
Best regards,
Ivan



More information about the dev mailing list