DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Junjie Wan <wan.junjie@foxmail.com>
Cc: dev@dpdk.org, remy.horton@intel.com
Subject: Re: [dpdk-dev] [PATCH v5] lib/metrics: add unregister api for metrics
Date: Tue, 02 Apr 2019 02:30:00 +0200	[thread overview]
Message-ID: <4081359.dCFH9vKgjk@xps> (raw)
Message-ID: <20190402003000.YixWQzfM97y2GYd4AFbz9Zi41295m4fITj59fIomLaI@z> (raw)
In-Reply-To: <1959572.AyLBI85xDo@xps>

02/04/2019 02:27, Thomas Monjalon:
> 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.

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



  parent reply	other threads:[~2019-04-02  0:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22  6:16 [dpdk-dev] [PATCH] "  =?gb18030?B?zfK/ob3c?=
2019-02-22 13:56 ` [dpdk-dev] [PATCH v2] " wanjunjie
2019-02-22 15:03   ` [dpdk-dev] [PATCH v3] " wanjunjie
2019-02-22 15:39     ` [dpdk-dev] [PATCH v4] " wanjunjie
2019-02-26 16:10       ` Remy Horton
2019-02-27 17:19       ` [dpdk-dev] [PATCH v5] " Junjie Wan
2019-02-28 11:53         ` Remy Horton
2019-02-28 13:28           ` Wan Junjie
2019-02-28 13:55             ` Remy Horton
2019-04-02  0:27         ` Thomas Monjalon
2019-04-02  0:27           ` Thomas Monjalon
2019-04-02  0:30           ` Thomas Monjalon [this message]
2019-04-02  0:30             ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4081359.dCFH9vKgjk@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=remy.horton@intel.com \
    --cc=wan.junjie@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).