remove the xstats function calls, as they are not needed for this class as-yet.
Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> --- 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