From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 416F4235 for ; Tue, 26 Feb 2019 17:10:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2019 08:10:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,416,1544515200"; d="scan'208";a="322264539" Received: from rhorton-mobl1.ger.corp.intel.com (HELO [163.33.178.163]) ([163.33.178.163]) by fmsmga006.fm.intel.com with ESMTP; 26 Feb 2019 08:10:38 -0800 To: wanjunjie , dev@dpdk.org References: <1550847790-12576-1-git-send-email-wan.junjie@foxmail.com> <1550849955-15101-1-git-send-email-wan.junjie@foxmail.com> From: Remy Horton Organization: Intel Shannon Limited Message-ID: <62e80592-dd86-7b59-5c09-b19c0a413325@intel.com> Date: Tue, 26 Feb 2019 16:10:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1550849955-15101-1-git-send-email-wan.junjie@foxmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] lib/metrics: add unregister api for metrics X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2019 16:10:40 -0000 This patch has checkpatch errors that will need to be fixed: ERROR:SPACING: space prohibited before that close parenthesis ')' #179: FILE: lib/librte_metrics/rte_metrics.c:233: + if (count < 1 ) ERROR:TRAILING_WHITESPACE: trailing whitespace #242: FILE: lib/librte_metrics/rte_metrics.c:298: +^I^Ifor (idx_name = 0; idx < stats->cnt_stats && $ If the patch is applied, two of the unit-tests for metrics break: # ./test/build/app/test RTE>>metrics_autotest + ------------------------------------------------------- + + Test Suite : Metrics Unit Test Suite + ------------------------------------------------------- + + TestCase [ 0] : test_metrics_without_init succeeded + TestCase [ 1] : test_metrics_reg_name_with_validname succeeded + TestCase [ 2] : test_metrics_reg_names succeeded + TestCase [ 3] : test_metrics_update_value failed + TestCase [ 4] : test_metrics_update_values failed + TestCase [ 5] : test_metrics_get_names succeeded + TestCase [ 6] : test_metrics_get_values succeeded + ------------------------------------------------------- + + Test Suite Summary + Tests Total : 7 + Tests Skipped : 0 + Tests Executed : 7 + Tests Unsupported: 0 + Tests Passed : 5 + Tests Failed : 2 + ------------------------------------------------------- + Both of these issues will need to be addressed. On 22/02/2019 15:39, wanjunjie wrote: > From: junka > > The bitmap will help maintain the metrics. We can dynamically > add and remove metrics data. For example, after uninit latency lib, > it could remove itself from the metrics. This could make the result > from rte_metrics_get_names much more simple to display the wanted > metrics data only. > > Signed-off-by: junka > --- > lib/librte_metrics/rte_metrics.c | 182 ++++++++++++++++++++++++++++----------- > lib/librte_metrics/rte_metrics.h | 21 +++++ > 2 files changed, 152 insertions(+), 51 deletions(-)