From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 70A7F37A8 for ; Tue, 2 Apr 2019 02:30:03 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1F88F21ADA; Mon, 1 Apr 2019 20:30:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 01 Apr 2019 20:30:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=gaJA9lBuGOM5YKxLzZSlZsu0uB9ca92yJPhW17WXHEE=; b=SjV23K3LgUcg YRBgJHDFPA84NOYJLDzj12Vu+s83klGmiA8sJOJja7bslVzw4eenbACyn9rbK/Q0 oOc0M5DhgFUuh9jOQ3jAeK8ayXiuyZpbmp6vi8tX1l2rxVnsbqrZq1cL/khu04rG Y6wC6XAb5gN8vEnTOX6Qgu9lX3Kb9SE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=gaJA9lBuGOM5YKxLzZSlZsu0uB9ca92yJPhW17WXH EE=; b=G0yWncET67tDTMG4zhtD1SFz/xvyUW+OlRps+kwMW2i/J640wAeIbK83b NvrGsYHW7kJr8GOFZvmKkmCr7jzA7+PdzAXaS7OBuZg3goJTZNP66CY5dI+K/bXP uFE4FgXUjdg2ll1CxA71zTV5sh0di3vebp2HYPLjm6753l8YFJ3n/YbyrJmTtTPd ZXyiwG0C+zIoxkpGgY82513dIvP627C+5pLEm2pwmXExIQS82SwhlXhAOwRlO3DD FKff8NuX4qVws3pZiAgNDa1M9GSO5QHTb82g97KBa5J/2wK7rPiG+ROqPpeL9Qhx +Ljhn+4Yus/F6qmn69bw9PZGQoDZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrleehgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 65C36E4210; Mon, 1 Apr 2019 20:30:01 -0400 (EDT) From: Thomas Monjalon To: Junjie Wan Cc: dev@dpdk.org, remy.horton@intel.com Date: Tue, 02 Apr 2019 02:30:00 +0200 Message-ID: <4081359.dCFH9vKgjk@xps> In-Reply-To: <1959572.AyLBI85xDo@xps> References: <1550849955-15101-1-git-send-email-wan.junjie@foxmail.com> <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com> <1959572.AyLBI85xDo@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5] 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, 02 Apr 2019 00:30:03 -0000 02/04/2019 02:27, Thomas Monjalon: > 27/02/2019 18:19, Junjie Wan: > > 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: Junjie Wan > > --- > > --- a/lib/librte_metrics/rte_metrics.h > > +++ b/lib/librte_metrics/rte_metrics.h > > /** > > + * Unregister set of metrics. > > + * > > + * Remove the metrics previously registered > > + * > > + * @param key > > + * Id of metrics to remove > > + * > > + * @param count > > + * Number of metrics > > + * > > + * @return > > + * - Zero: Success > > + * - -EIO: Error, unable to access metrics shared memory > > + * (rte_metrics_init() not called) > > + * - -EINVAL: Error, invalid parameters > > + * - -ERANGE: Error, oversized > > + */ > > +int > > +rte_metrics_unreg_values(uint16_t key, uint16_t count); > > The rule is to add new API as experimental for some time. > Please check how other new API functions are introduced. > > You will need to add the function in rte_metrics_version.map > to make it work in a shared library. Few more requests: Please would you like to add a test in app/test/test_metrics.c? And maybe add some words in doc/guides/prog_guide/metrics_lib.rst? Thanks From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0B7E6A0679 for ; Tue, 2 Apr 2019 02:30:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 455D64C8D; Tue, 2 Apr 2019 02:30:04 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 70A7F37A8 for ; Tue, 2 Apr 2019 02:30:03 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1F88F21ADA; Mon, 1 Apr 2019 20:30:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 01 Apr 2019 20:30:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=gaJA9lBuGOM5YKxLzZSlZsu0uB9ca92yJPhW17WXHEE=; b=SjV23K3LgUcg YRBgJHDFPA84NOYJLDzj12Vu+s83klGmiA8sJOJja7bslVzw4eenbACyn9rbK/Q0 oOc0M5DhgFUuh9jOQ3jAeK8ayXiuyZpbmp6vi8tX1l2rxVnsbqrZq1cL/khu04rG Y6wC6XAb5gN8vEnTOX6Qgu9lX3Kb9SE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=gaJA9lBuGOM5YKxLzZSlZsu0uB9ca92yJPhW17WXH EE=; b=G0yWncET67tDTMG4zhtD1SFz/xvyUW+OlRps+kwMW2i/J640wAeIbK83b NvrGsYHW7kJr8GOFZvmKkmCr7jzA7+PdzAXaS7OBuZg3goJTZNP66CY5dI+K/bXP uFE4FgXUjdg2ll1CxA71zTV5sh0di3vebp2HYPLjm6753l8YFJ3n/YbyrJmTtTPd ZXyiwG0C+zIoxkpGgY82513dIvP627C+5pLEm2pwmXExIQS82SwhlXhAOwRlO3DD FKff8NuX4qVws3pZiAgNDa1M9GSO5QHTb82g97KBa5J/2wK7rPiG+ROqPpeL9Qhx +Ljhn+4Yus/F6qmn69bw9PZGQoDZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrleehgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 65C36E4210; Mon, 1 Apr 2019 20:30:01 -0400 (EDT) From: Thomas Monjalon To: Junjie Wan Cc: dev@dpdk.org, remy.horton@intel.com Date: Tue, 02 Apr 2019 02:30:00 +0200 Message-ID: <4081359.dCFH9vKgjk@xps> In-Reply-To: <1959572.AyLBI85xDo@xps> References: <1550849955-15101-1-git-send-email-wan.junjie@foxmail.com> <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com> <1959572.AyLBI85xDo@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v5] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190402003000.YixWQzfM97y2GYd4AFbz9Zi41295m4fITj59fIomLaI@z> 02/04/2019 02:27, Thomas Monjalon: > 27/02/2019 18:19, Junjie Wan: > > 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: Junjie Wan > > --- > > --- a/lib/librte_metrics/rte_metrics.h > > +++ b/lib/librte_metrics/rte_metrics.h > > /** > > + * Unregister set of metrics. > > + * > > + * Remove the metrics previously registered > > + * > > + * @param key > > + * Id of metrics to remove > > + * > > + * @param count > > + * Number of metrics > > + * > > + * @return > > + * - Zero: Success > > + * - -EIO: Error, unable to access metrics shared memory > > + * (rte_metrics_init() not called) > > + * - -EINVAL: Error, invalid parameters > > + * - -ERANGE: Error, oversized > > + */ > > +int > > +rte_metrics_unreg_values(uint16_t key, uint16_t count); > > The rule is to add new API as experimental for some time. > Please check how other new API functions are introduced. > > You will need to add the function in rte_metrics_version.map > to make it work in a shared library. Few more requests: Please would you like to add a test in app/test/test_metrics.c? And maybe add some words in doc/guides/prog_guide/metrics_lib.rst? Thanks