27/02/2019 18:19, Junjie Wan: > From: junka <[email protected]> > > 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 <[email protected]> > --- > --- 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.

