All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>,
	harry.van.haaren@intel.com,
	Jacek Piasecki <jacekx.piasecki@intel.com>,
	Kuba Kozak <kubax.kozak@intel.com>,
	Tomasz Kulasek <tomaszx.kulasek@intel.com>
Cc: dev@dpdk.org, deepak.k.jain@intel.com
Subject: Re: [PATCH v5 1/3] ethdev: new xstats API add retrieving by ID
Date: Wed, 12 Apr 2017 19:10:58 +0200	[thread overview]
Message-ID: <2044924.BXrfah3NT8@xps13> (raw)
In-Reply-To: <1491928644-10383-2-git-send-email-michalx.k.jastrzebski@intel.com>

> --- a/app/proc_info/main.c
> +++ b/app/proc_info/main.c
>  		"  --stats: to display port statistics, enabled by default\n"
>  		"  --xstats: to display extended port statistics, disabled by "
>  			"default\n"
> -		"  --metrics: to display derived metrics of the ports, disabled by "
> -			"default\n"
> +		"  --xstats-name NAME: to display single xstat value by NAME\n"
> +		"  --xstats-ids IDLIST: to display xstat values by id. "
> +			"The argument is comma-separated list of xstat ids to print out.\n"
>  		"  --stats-reset: to reset port statistics\n"
>  		"  --xstats-reset: to reset port extended statistics\n"

Why removing --metrics? Is it a rebase mistake?

Please, could you introduce these new proc_info options in a separate patch?

> --- a/doc/guides/prog_guide/poll_mode_drv.rst
> +++ b/doc/guides/prog_guide/poll_mode_drv.rst
> +The extended statistics API allows a PMD to expose all statistics that are
> +available to it, including statistics that are unique to the device.
> +Each statistic has three properties ``name``, ``id`` and ``value``:
> +
> +* ``name``: A human readable string formatted by the scheme detailed below.
> +* ``id``: An integer that represents only that statistic.

Suggestion: we could say that the id/name pair may change from a device
to another one.

> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
>  int
> -rte_eth_xstats_get_names(uint8_t port_id,
> -	struct rte_eth_xstat_name *xstats_names,
> -	unsigned size)
> +rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
> +		uint64_t *id)
[...]
> +/* retrieve ethdev extended statistics */
> +int
> +rte_eth_xstats_get_v22(uint8_t port_id, struct rte_eth_xstat *xstats,
> +	unsigned int n)

I do not manage to review the function changes because of the mix
of versioning old functions and introduce new ones.
It would have been simpler to separate these two steps in separate patches.

> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> -	eth_xstats_get_names_t     xstats_get_names;
> -	/**< Get names of extended statistics. */
> +	eth_xstats_get_names_t	   xstats_get_names;
> +	/**< Get names of extended device statistics. */

It seems a space alignment has been removed here.

> - * Retrieve names of extended statistics of an Ethernet device.
> +* Gets the ID of a statistic from its name.
> +*
> +* Note this function searches for the statistics using string compares, and
> +* as such should not be used on the fast-path. For fast-path retrieval of
> +* specific statistics, store the ID as provided in *id* from this function,
> +* and pass the ID to rte_eth_xstats_get()

Good to note :)

> -int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
> -		unsigned n);
[...]
> +int rte_eth_xstats_get_v1705(uint8_t port_id, uint64_t *ids, uint64_t *values,
> +	unsigned int n);
> +
> +int rte_eth_xstats_get(uint8_t port_id, uint64_t *ids, uint64_t *values,
> +	unsigned int n);

It is an API change.
Please reference it in the release notes.

> --- a/lib/librte_ether/rte_ether_version.map
> +++ b/lib/librte_ether/rte_ether_version.map
> @@ -159,5 +159,10 @@ DPDK_17.05 {
>  	global:
>  
>  	rte_eth_find_next;
> +	rte_eth_xstats_get_names;
> +	rte_eth_xstats_get;
> +	rte_eth_xstats_get_all;
> +	rte_eth_xstats_get_names_all;
> +	rte_eth_xstats_get_id_by_name;

Please keep alphabetical order.


Conclusion: The API looks right.
I have not checked the implementation and hope there will be less bugs
than when introducing the old one ;)

  parent reply	other threads:[~2017-04-12 17:11 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30 21:50 [PATCH v2 0/5] Extended xstats API in ethdev library to allow grouping of stats Michal Jastrzebski
2017-03-30 21:50 ` [PATCH v2 1/5] add new xstats API retrieving by id Michal Jastrzebski
2017-04-03 12:09   ` [PATCH v3 0/3] Extended xstats API in ethdev library to allow grouping of stats Jacek Piasecki
2017-04-03 12:09     ` [PATCH v3 1/3] add new xstats API retrieving by id Jacek Piasecki
2017-04-03 12:37       ` Van Haaren, Harry
2017-04-04 15:03       ` Thomas Monjalon
2017-04-04 15:45         ` Van Haaren, Harry
2017-04-04 16:18           ` Thomas Monjalon
2017-04-10 17:59       ` [PATCH v4 0/3] Extended xstats API in ethdev library to allow grouping of stats Jacek Piasecki
2017-04-10 17:59         ` [PATCH v4 1/3] ethdev: new xstats API add retrieving by ID Jacek Piasecki
2017-04-11 16:37           ` [PATCH v5 0/3] Extended xstats API in ethdev library to allow grouping of stats Michal Jastrzebski
2017-04-11 16:37             ` [PATCH v5 1/3] ethdev: new xstats API add retrieving by ID Michal Jastrzebski
2017-04-12  8:56               ` Van Haaren, Harry
2017-04-12 17:10               ` Thomas Monjalon [this message]
2017-04-13 10:52               ` Mcnamara, John
2017-04-13 14:59               ` [PATCH v6 0/5] Extended xstats API in ethdev library to allow grouping of stats Kuba Kozak
2017-04-13 14:59                 ` [PATCH v6 1/5] ethdev: new xstats API add retrieving by ID Kuba Kozak
2017-04-13 16:23                   ` Van Haaren, Harry
2017-04-13 14:59                 ` [PATCH v6 2/5] ethdev: added new function for xstats ID Kuba Kozak
2017-04-13 16:23                   ` Van Haaren, Harry
2017-04-13 14:59                 ` [PATCH v6 3/5] proc-info: add support for new xstats API Kuba Kozak
2017-04-13 16:23                   ` Van Haaren, Harry
2017-04-13 14:59                 ` [PATCH v6 4/5] net/e1000: new xstats API add ID support for e1000 Kuba Kozak
2017-04-13 16:23                   ` Van Haaren, Harry
2017-04-13 14:59                 ` [PATCH v6 5/5] net/ixgbe: new xstats API add ID support for ixgbe Kuba Kozak
2017-04-13 16:23                   ` Van Haaren, Harry
2017-04-13 16:21                 ` [PATCH v6 0/5] Extended xstats API in ethdev library to allow grouping of stats Van Haaren, Harry
2017-04-20 20:31                 ` Thomas Monjalon
2017-04-24 12:32                   ` Olivier Matz
2017-04-24 12:41                     ` Thomas Monjalon
2017-04-24 15:49                       ` Mcnamara, John
2017-04-25 22:49                         ` Roger B Melton
2017-04-11 16:37             ` [PATCH v5 2/3] net/e1000: new xstats API add ID support for e1000 Michal Jastrzebski
2017-04-12  8:56               ` Van Haaren, Harry
2017-04-11 16:37             ` [PATCH v5 3/3] net/ixgbe: new xstats API add ID support for ixgbe Michal Jastrzebski
2017-04-12  8:56               ` Van Haaren, Harry
2017-04-10 17:59         ` [PATCH v4 2/3] net/e1000: new xstats API add ID support for e1000 Jacek Piasecki
2017-04-10 17:59         ` [PATCH v4 3/3] net/ixgbe: new xstats API add ID support for ixgbe Jacek Piasecki
2017-04-03 12:09     ` [PATCH v3 2/3] add new xstats API id support for e1000 Jacek Piasecki
2017-04-03 12:38       ` Van Haaren, Harry
2017-04-03 12:09     ` [PATCH v3 3/3] add new xstats API id support for ixgbe Jacek Piasecki
2017-04-03 12:38       ` Van Haaren, Harry
2017-03-30 21:50 ` [PATCH v2 2/5] add new xstats API id support for e1000 Michal Jastrzebski
2017-03-30 22:06 ` [PATCH v2 3/5] add new xstats API id support for ixgbe Michal Jastrzebski
2017-03-30 22:22 ` [PATCH v2 4/5] add support for new xstats API retrieving by id Michal Jastrzebski
2017-03-30 22:23 ` [PATCH v2 5/5] " Michal Jastrzebski

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=2044924.BXrfah3NT8@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=jacekx.piasecki@intel.com \
    --cc=kubax.kozak@intel.com \
    --cc=michalx.k.jastrzebski@intel.com \
    --cc=tomaszx.kulasek@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.