From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 316C937A8
 for <dev@dpdk.org>; Tue,  2 Apr 2019 02:27:49 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id B6DF921165;
 Mon,  1 Apr 2019 20:27:48 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Mon, 01 Apr 2019 20:27:48 -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=Cd9790L4qc0M3l9Us+Mk3t3QcczmPRzOPt0R/p0tqF0=; b=N1MDUd9SbY7t
 jZNWAOq+A8fPCmXEqJAd0l4EUphGcbkEEeBMDhakbjT9A88qYiSKMFaPO3tewQvA
 w0v2XM3ksj1tEHb8woNOLk7dSFtSUlTo1++gguVv4FBkme/vBF4QQmBgTZv9uXQp
 Vv/QzLrTa/XHARdhtASv6uUevt3pkIA=
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=Cd9790L4qc0M3l9Us+Mk3t3QcczmPRzOPt0R/p0tq
 F0=; b=Dsk89bJILIa4Z8VVr5ZNHw9OnxFelhlm1iUJfwJdS9bCN66/6JZZ/wLxv
 77bIAolU2IpBOqmPqyhx/PQpF5Oiz41LAilnwn/Zza4RyefDmEEjFV9HY/LrpAGf
 vdACAY0Ax8eLxlYwFZnGJnTii2aUDnCpB6Qvdl8R2D4VxfM+VDu8fvQ1u1DQHa/i
 L4gYxj4XJMaHLdM0BbR+WPVyc2J/I013Ra1db1yTaGIu8dw5twYlqMksR0eUdsim
 6xcHubn2YDxoUpIBTNqwMflXXKFfA1KzNUh5aP3NDnlPp35dYMOcZBVe8ZI5t7zF
 XV02EN+ChKpGTWSNb8bo/OUfJP1UQ==
X-ME-Sender: <xms:g6yiXGyzzlBhMqqQ8SKk5eWeatNSncP_HLdcQDNj3HlwZCnXsCUsTw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrleehgdeffecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph
 epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho
 mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd
X-ME-Proxy: <xmx:g6yiXGMsfMjAGvb98wvTYKWKmrIPi-HvyIyOTM36NDvGQMP1GIMwSA>
 <xmx:g6yiXM6O-rV2kM-whgXcbeFEpulXy2mFr_yKMkfVqC8WKrVibb0_8A>
 <xmx:g6yiXEfrifdQ9aSEc5Xgz8PJctnmEIb9zakmKhEkozuASCiBAp0qDg>
 <xmx:hKyiXNG8fnTpXoDpw5NxoNspBELSbwoIzF8RUyuCr2YfZSz8mS-psA>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 6C3AC10310;
 Mon,  1 Apr 2019 20:27:46 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Junjie Wan <wan.junjie@foxmail.com>
Cc: dev@dpdk.org, remy.horton@intel.com
Date: Tue, 02 Apr 2019 02:27:45 +0200
Message-ID: <1959572.AyLBI85xDo@xps>
In-Reply-To: <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com>
References: <1550849955-15101-1-git-send-email-wan.junjie@foxmail.com>
 <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Apr 2019 00:27:49 -0000

27/02/2019 18:19, Junjie Wan:
> From: junka <wan.junjie@foxmail.com>
> 
> 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 <wan.junjie@foxmail.com>
> ---
> --- 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.

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 2628EA0679
	for <public@inbox.dpdk.org>; Tue,  2 Apr 2019 02:27:51 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 004B34C8D;
	Tue,  2 Apr 2019 02:27:50 +0200 (CEST)
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 316C937A8
 for <dev@dpdk.org>; Tue,  2 Apr 2019 02:27:49 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id B6DF921165;
 Mon,  1 Apr 2019 20:27:48 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Mon, 01 Apr 2019 20:27:48 -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=Cd9790L4qc0M3l9Us+Mk3t3QcczmPRzOPt0R/p0tqF0=; b=N1MDUd9SbY7t
 jZNWAOq+A8fPCmXEqJAd0l4EUphGcbkEEeBMDhakbjT9A88qYiSKMFaPO3tewQvA
 w0v2XM3ksj1tEHb8woNOLk7dSFtSUlTo1++gguVv4FBkme/vBF4QQmBgTZv9uXQp
 Vv/QzLrTa/XHARdhtASv6uUevt3pkIA=
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=Cd9790L4qc0M3l9Us+Mk3t3QcczmPRzOPt0R/p0tq
 F0=; b=Dsk89bJILIa4Z8VVr5ZNHw9OnxFelhlm1iUJfwJdS9bCN66/6JZZ/wLxv
 77bIAolU2IpBOqmPqyhx/PQpF5Oiz41LAilnwn/Zza4RyefDmEEjFV9HY/LrpAGf
 vdACAY0Ax8eLxlYwFZnGJnTii2aUDnCpB6Qvdl8R2D4VxfM+VDu8fvQ1u1DQHa/i
 L4gYxj4XJMaHLdM0BbR+WPVyc2J/I013Ra1db1yTaGIu8dw5twYlqMksR0eUdsim
 6xcHubn2YDxoUpIBTNqwMflXXKFfA1KzNUh5aP3NDnlPp35dYMOcZBVe8ZI5t7zF
 XV02EN+ChKpGTWSNb8bo/OUfJP1UQ==
X-ME-Sender: <xms:g6yiXGyzzlBhMqqQ8SKk5eWeatNSncP_HLdcQDNj3HlwZCnXsCUsTw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrleehgdeffecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph
 epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho
 mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd
X-ME-Proxy: <xmx:g6yiXGMsfMjAGvb98wvTYKWKmrIPi-HvyIyOTM36NDvGQMP1GIMwSA>
 <xmx:g6yiXM6O-rV2kM-whgXcbeFEpulXy2mFr_yKMkfVqC8WKrVibb0_8A>
 <xmx:g6yiXEfrifdQ9aSEc5Xgz8PJctnmEIb9zakmKhEkozuASCiBAp0qDg>
 <xmx:hKyiXNG8fnTpXoDpw5NxoNspBELSbwoIzF8RUyuCr2YfZSz8mS-psA>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 6C3AC10310;
 Mon,  1 Apr 2019 20:27:46 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Junjie Wan <wan.junjie@foxmail.com>
Cc: dev@dpdk.org, remy.horton@intel.com
Date: Tue, 02 Apr 2019 02:27:45 +0200
Message-ID: <1959572.AyLBI85xDo@xps>
In-Reply-To: <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com>
References: <1550849955-15101-1-git-send-email-wan.junjie@foxmail.com>
 <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190402002745.D97O8goERJMZlFQH1TY98yL-GZxdHSltn3EP42X_Srk@z>

27/02/2019 18:19, Junjie Wan:
> From: junka <wan.junjie@foxmail.com>
> 
> 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 <wan.junjie@foxmail.com>
> ---
> --- 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.