[dpdk-dev] [PATCH v2 1/2] ethdev: expose basic xstats for driver use

Andrew Rybchenko arybchenko at solarflare.com
Mon Jul 1 12:54:52 CEST 2019


On 27.06.2019 2:33, Stephen Hemminger wrote:
> Avoid duplication by having generic basic xstats available
> for use by drivers. A later patch uses this for failsafe
> driver.
>
> Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>

[...]


> diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
> index 2922d5b7cc95..91ce1880d1c6 100644
> --- a/lib/librte_ethdev/rte_ethdev_core.h
> +++ b/lib/librte_ethdev/rte_ethdev_core.h
> @@ -517,6 +517,20 @@ struct eth_dev_ops {
>   	/**< Test if a port supports specific mempool ops */
>   };
>   
> +/**
> + * @internal
> + * Get basic stats for ethdev
> + */
> +int __rte_experimental
> +rte_eth_basic_stats_count(struct rte_eth_dev *dev);
> +
> +int  __rte_experimental
> +rte_eth_basic_stats_get_names(struct rte_eth_dev *dev,
> +			      struct rte_eth_xstat_name *xstats_names);
> +
> +int __rte_experimental
> +rte_eth_basic_stats_get(uint16_t port_id, struct rte_eth_xstat *xstats);
> +
>   /**
>    * @internal
>    * Structure used to hold information about the callbacks to be called for a

It conflicts with __rte_experimenal placing patch which is on the 
mailing list.
Also I've expected to see these functions in rte_ethdev_driver.h to
avoid inclusion in rte_ethdev.h. As I understand these functions are for
rte_ethdev and drivers only.

> diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
> index df9141825c3f..949a79800cbc 100644
> --- a/lib/librte_ethdev/rte_ethdev_version.map
> +++ b/lib/librte_ethdev/rte_ethdev_version.map
> @@ -239,6 +239,9 @@ DPDK_19.05 {
>   EXPERIMENTAL {
>   	global:
>   
> +	rte_eth_basic_stats_count;
> +	rte_eth_basic_stats_get;
> +	rte_eth_basic_stats_get_names;
>   	rte_eth_devargs_parse;
>   	rte_eth_dev_create;
>   	rte_eth_dev_destroy;


More information about the dev mailing list