From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v1] lib/metrics: fix silent fail when uninitialised Date: Thu, 26 Jul 2018 20:29:30 +0200 Message-ID: <4143071.v8a4Ec99S8@xps> References: <20180702145547.8376-1-remy.horton@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Reshma Pattan To: Remy Horton Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id AA58023D for ; Thu, 26 Jul 2018 20:29:36 +0200 (CEST) In-Reply-To: <20180702145547.8376-1-remy.horton@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" 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 scenario to an explicit fail by returning -EIO. > > Fixes: 349950ddb9c5 ("metrics: add information metrics library") > > Signed-off-by: Remy Horton Applied, thanks