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 B6D6EA0C48; Tue, 6 Jul 2021 22:29:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90891413DA; Tue, 6 Jul 2021 22:29:14 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 217BC4133B for ; Tue, 6 Jul 2021 22:29:11 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="196470327" X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="196470327" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 13:29:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="486522072" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by FMSMGA003.fm.intel.com with ESMTP; 06 Jul 2021 13:29:09 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Chengwen Feng , Jerin Jacob , Jerin Jacob , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Bruce Richardson Date: Tue, 6 Jul 2021 21:28:36 +0100 Message-Id: <20210706202841.661302-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210706202841.661302-1-bruce.richardson@intel.com> References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <20210706202841.661302-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC UPDATE PATCH 4/9] dmadev: remove xstats functions 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" remove the xstats function calls, as they are not needed for this class as-yet. Signed-off-by: Bruce Richardson --- lib/dmadev/rte_dmadev.c | 63 -------------------------- lib/dmadev/rte_dmadev.h | 89 ------------------------------------- lib/dmadev/rte_dmadev_pmd.h | 19 -------- lib/dmadev/version.map | 3 -- 4 files changed, 174 deletions(-) diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c index ffd7c5b97..fed168675 100644 --- a/lib/dmadev/rte_dmadev.c +++ b/lib/dmadev/rte_dmadev.c @@ -282,69 +282,6 @@ rte_dmadev_stats_reset(uint16_t dev_id, int vq_id) return (*dev->dev_ops->stats_reset)(dev, vq_id); } -static int -xstats_get_count(uint16_t dev_id) -{ - struct rte_dmadev *dev = &rte_dmadevices[dev_id]; - - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_get_names, -ENOTSUP); - - return (*dev->dev_ops->xstats_get_names)(dev, NULL, 0); -} - -int -rte_dmadev_xstats_names_get(uint16_t dev_id, - struct rte_dmadev_xstats_name *xstats_names, - uint32_t size) -{ - struct rte_dmadev *dev; - int cnt_expected_entries; - - RTE_DMADEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); - - cnt_expected_entries = xstats_get_count(dev_id); - - if (xstats_names == NULL || cnt_expected_entries < 0 || - (int)size < cnt_expected_entries || size == 0) - return cnt_expected_entries; - - dev = &rte_dmadevices[dev_id]; - - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_get_names, -ENOTSUP); - return (*dev->dev_ops->xstats_get_names)(dev, xstats_names, size); -} - -int -rte_dmadev_xstats_get(uint16_t dev_id, const uint32_t ids[], - uint64_t values[], uint32_t n) -{ - struct rte_dmadev *dev; - - RTE_DMADEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); - RTE_FUNC_PTR_OR_ERR_RET(ids, -EINVAL); - RTE_FUNC_PTR_OR_ERR_RET(values, -EINVAL); - - dev = &rte_dmadevices[dev_id]; - - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_get, -ENOTSUP); - - return (*dev->dev_ops->xstats_get)(dev, ids, values, n); -} - -int -rte_dmadev_xstats_reset(uint16_t dev_id, const uint32_t ids[], uint32_t nb_ids) -{ - struct rte_dmadev *dev; - - RTE_DMADEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); - - dev = &rte_dmadevices[dev_id]; - - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_reset, -ENOTSUP); - - return (*dev->dev_ops->xstats_reset)(dev, ids, nb_ids); -} - int rte_dmadev_dump(uint16_t dev_id, FILE *f) { diff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h index d64df17bd..2bfc0b619 100644 --- a/lib/dmadev/rte_dmadev.h +++ b/lib/dmadev/rte_dmadev.h @@ -824,95 +824,6 @@ __rte_experimental int rte_dmadev_stats_reset(uint16_t dev_id, int vq_id); -/** Maximum name length for extended statistics counters */ -#define RTE_DMA_DEV_XSTATS_NAME_SIZE 64 - -/** - * A name-key lookup element for extended statistics. - * - * This structure is used to map between names and ID numbers - * for extended ethdev statistics. - */ -struct rte_dmadev_xstats_name { - char name[RTE_DMA_DEV_XSTATS_NAME_SIZE]; -}; - -/** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * - * Retrieve names of extended statistics of a DMA device. - * - * @param dev_id - * The identifier of the device. - * @param[out] xstats_names - * Block of memory to insert names into. Must be at least size in capacity. - * If set to NULL, function returns required capacity. - * @param size - * Capacity of xstats_names (number of names). - * @return - * - positive value lower or equal to size: success. The return value - * is the number of entries filled in the stats table. - * - positive value higher than size: error, the given statistics table - * is too small. The return value corresponds to the size that should - * be given to succeed. The entries in the table are not valid and - * shall not be used by the caller. - * - negative value on error. - */ -__rte_experimental -int -rte_dmadev_xstats_names_get(uint16_t dev_id, - struct rte_dmadev_xstats_name *xstats_names, - uint32_t size); - -/** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * - * Retrieve extended statistics of a DMA device. - * - * @param dev_id - * The identifier of the device. - * @param ids - * The id numbers of the stats to get. The ids can be got from the stat - * position in the stat list from rte_dmadev_get_xstats_names(). - * @param[out] values - * The values for each stats request by ID. - * @param n - * The number of stats requested. - * - * @return - * - positive value: number of stat entries filled into the values array. - * - negative value on error. - */ -__rte_experimental -int -rte_dmadev_xstats_get(uint16_t dev_id, const uint32_t ids[], - uint64_t values[], uint32_t n); - -/** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * - * Reset the values of the xstats of the selected component in the device. - * - * @param dev_id - * The identifier of the device. - * @param ids - * Selects specific statistics to be reset. When NULL, all statistics - * will be reset. If non-NULL, must point to array of at least - * *nb_ids* size. - * @param nb_ids - * The number of ids available from the *ids* array. Ignored when ids is NULL. - * - * @return - * - zero: successfully reset the statistics to zero. - * - negative value on error. - */ -__rte_experimental -int -rte_dmadev_xstats_reset(uint16_t dev_id, const uint32_t ids[], uint32_t nb_ids); - /** * @warning * @b EXPERIMENTAL: this API may change without prior notice. diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h index 428ddc943..d0ec43af6 100644 --- a/lib/dmadev/rte_dmadev_pmd.h +++ b/lib/dmadev/rte_dmadev_pmd.h @@ -120,19 +120,6 @@ typedef int (*dmadev_stats_get_t)(struct rte_dmadev *dev, int vq_id, typedef int (*dmadev_stats_reset_t)(struct rte_dmadev *dev, int vq_id); /**< @internal Function used to reset basic statistics. */ -typedef int (*dmadev_xstats_get_names_t)(const struct rte_dmadev *dev, - struct rte_dmadev_xstats_name *xstats_names, - uint32_t size); -/**< @internal Function used to get names of extended stats. */ - -typedef int (*dmadev_xstats_get_t)(const struct rte_dmadev *dev, - const uint32_t ids[], uint64_t values[], uint32_t n); -/**< @internal Function used to retrieve extended stats. */ - -typedef int (*dmadev_xstats_reset_t)(struct rte_dmadev *dev, - const uint32_t ids[], uint32_t nb_ids); -/**< @internal Function used to reset extended stats. */ - typedef int (*dmadev_selftest_t)(uint16_t dev_id); /**< @internal Function used to start dmadev selftest. */ @@ -164,12 +151,6 @@ struct rte_dmadev_ops { dmadev_stats_get_t stats_get; /**< Reset basic statistics. */ dmadev_stats_reset_t stats_reset; - /**< Get names of extended stats. */ - dmadev_xstats_get_names_t xstats_get_names; - /**< Get extended statistics. */ - dmadev_xstats_get_t xstats_get; - /**< Reset extended statistics values. */ - dmadev_xstats_reset_t xstats_reset; /**< Device selftest function */ dmadev_selftest_t dev_selftest; diff --git a/lib/dmadev/version.map b/lib/dmadev/version.map index ed051d54f..a4d6b539a 100644 --- a/lib/dmadev/version.map +++ b/lib/dmadev/version.map @@ -27,9 +27,6 @@ EXPERIMENTAL { rte_dmadev_completed_fails; rte_dmadev_stats_get; rte_dmadev_stats_reset; - rte_dmadev_xstats_names_get; - rte_dmadev_xstats_get; - rte_dmadev_xstats_reset; rte_dmadev_selftest; local: *; -- 2.30.2