[EXTERNAL] [PATCH v2 3/9] crypto/zsda: add statistics
Akhil Goyal
gakhil at marvell.com
Wed May 14 09:08:26 CEST 2025
> Add crypto statistics operations for zsda devices.
>
> Signed-off-by: Hanxiao Li <li.hanxiao at zte.com.cn>
> ---
> drivers/crypto/zsda/zsda_sym_pmd.c | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/zsda/zsda_sym_pmd.c
> b/drivers/crypto/zsda/zsda_sym_pmd.c
> index 22c8d482fb..31ba582b68 100644
> --- a/drivers/crypto/zsda/zsda_sym_pmd.c
> +++ b/drivers/crypto/zsda/zsda_sym_pmd.c
> @@ -90,6 +90,25 @@ zsda_sym_dev_info_get(struct rte_cryptodev *dev,
> }
> }
>
> +static void
> +zsda_sym_stats_get(struct rte_cryptodev *dev, struct rte_cryptodev_stats
> *stats)
> +{
> + struct zsda_qp_stat comm = {0};
> +
> + zsda_stats_get(dev->data->queue_pairs, dev->data->nb_queue_pairs,
> + &comm);
> + stats->enqueued_count = comm.enqueued_count;
> + stats->dequeued_count = comm.dequeued_count;
> + stats->enqueue_err_count = comm.enqueue_err_count;
> + stats->dequeue_err_count = comm.dequeue_err_count;
> +}
> +
> +static void
> +zsda_sym_stats_reset(struct rte_cryptodev *dev)
> +{
> + zsda_stats_reset(dev->data->queue_pairs, dev->data->nb_queue_pairs);
> +}
> +
> static struct rte_cryptodev_ops crypto_zsda_ops = {
>
> .dev_configure = zsda_sym_dev_config,
> @@ -98,8 +117,8 @@ static struct rte_cryptodev_ops crypto_zsda_ops = {
> .dev_close = zsda_sym_dev_close,
> .dev_infos_get = zsda_sym_dev_info_get,
>
> - .stats_get = NULL,
> - .stats_reset = NULL,
> + .stats_get = zsda_sym_stats_get,
> + .stats_reset = zsda_sym_stats_reset,
Same comment here also for 'sym'
> .queue_pair_setup = NULL,
> .queue_pair_release = NULL,
>
> --
> 2.27.0
More information about the dev
mailing list