[dpdk-dev] [PATCH v10 11/16] dma/idxd: add operation statistic tracking

fengchengwen fengchengwen at huawei.com
Wed Oct 20 11:18:15 CEST 2021


On 2021/10/19 22:10, Kevin Laatz wrote:
> Add statistic tracking for DSA devices.
> 
> The dmadev library documentation is also updated to add a generic section
> for using the library's statistics APIs.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> Signed-off-by: Kevin Laatz <kevin.laatz at intel.com>
> Reviewed-by: Conor Walsh <conor.walsh at intel.com>
> Reviewed-by: Chengwen Feng <fengchengwen at huawei.com>
> ---
>  doc/guides/prog_guide/dmadev.rst | 11 +++++++++++
>  drivers/dma/idxd/idxd_bus.c      |  2 ++
>  drivers/dma/idxd/idxd_common.c   | 27 +++++++++++++++++++++++++++
>  drivers/dma/idxd/idxd_internal.h |  5 +++++
>  drivers/dma/idxd/idxd_pci.c      |  2 ++
>  5 files changed, 47 insertions(+)
> 
> diff --git a/doc/guides/prog_guide/dmadev.rst b/doc/guides/prog_guide/dmadev.rst
> index e853ffda3a..139eaff299 100644
> --- a/doc/guides/prog_guide/dmadev.rst
> +++ b/doc/guides/prog_guide/dmadev.rst
> @@ -107,3 +107,14 @@ completed operations along with the status of each operation (filled into the
>  ``status`` array passed by user). These two APIs can also return the last
>  completed operation's ``ring_idx`` which could help user track operations within
>  their own application-defined rings.
> +
> +
> +Querying Device Statistics
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~

could remove last ~

anyway,
Reviewed-by: Chengwen Feng <fengchengwen at huawei.com>

> +
> +The statistics from a dmadev device can be got via the statistics functions,
> +i.e. ``rte_dma_stats_get()``. The statistics returned for each device instance are:
> +
> +* ``submitted``: The number of operations submitted to the device.
> +* ``completed``: The number of operations which have completed (successful and failed).
> +* ``errors``: The number of operations that completed with error.
> diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
> index b2acdac4f9..b52ea02854 100644
> --- a/drivers/dma/idxd/idxd_bus.c
> +++ b/drivers/dma/idxd/idxd_bus.c
> @@ -99,6 +99,8 @@ static const struct rte_dma_dev_ops idxd_bus_ops = {
>  		.dev_configure = idxd_configure,
>  		.vchan_setup = idxd_vchan_setup,
>  		.dev_info_get = idxd_info_get,
> +		.stats_get = idxd_stats_get,
> +		.stats_reset = idxd_stats_reset,
>  };
>  

[snip]

> 



More information about the dev mailing list