From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30003A0C43; Wed, 20 Oct 2021 11:18:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD81440687; Wed, 20 Oct 2021 11:18:24 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id A838140142 for ; Wed, 20 Oct 2021 11:18:23 +0200 (CEST) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4HZ4jv0HyPzZcMy; Wed, 20 Oct 2021 17:16:35 +0800 (CST) Received: from dggpeml500024.china.huawei.com (7.185.36.10) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Wed, 20 Oct 2021 17:18:21 +0800 Received: from [127.0.0.1] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Wed, 20 Oct 2021 17:18:15 +0800 To: Kevin Laatz , CC: , , , References: <20210827172048.558704-1-kevin.laatz@intel.com> <20211019141041.1890983-1-kevin.laatz@intel.com> <20211019141041.1890983-12-kevin.laatz@intel.com> From: fengchengwen Message-ID: <03840684-7373-2135-b98c-ad3c143efb02@huawei.com> Date: Wed, 20 Oct 2021 17:18:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20211019141041.1890983-12-kevin.laatz@intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v10 11/16] dma/idxd: add operation statistic tracking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > Signed-off-by: Kevin Laatz > Reviewed-by: Conor Walsh > Reviewed-by: Chengwen Feng > --- > 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 > + > +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] >