Re: [dpdk-dev] [PATCH v1] lib/metrics: fix silent fail when uninitialised

2018-07-26 Thread Thomas Monjalon
02/07/2018 16:55, Remy Horton: > If rte_metrics_init() had not been called and hence the internal > metric storage is not allocated, rte_metrics_get_values() and > rte_metrics_get_name() would silently fail by returning zero > (i.e. no metrics registered). This patch changes the result of > this sc

[dpdk-dev] [PATCH v1] lib/metrics: fix silent fail when uninitialised

2018-07-02 Thread Remy Horton
If rte_metrics_init() had not been called and hence the internal metric storage is not allocated, rte_metrics_get_values() and rte_metrics_get_name() would silently fail by returning zero (i.e. no metrics registered). This patch changes the result of this scenario to an explicit fail by returning -