[PATCH 01/10] bbdev: fix stats aggregation from queues
Chautru, Nicolas
nicolas.chautru at intel.com
Fri Jul 17 19:22:50 CEST 2026
Hi David,
We use the same structure for device and queue level stats for simplicity.
But really bringing these 2 at device level as an aggregate level do not really make much sense at system evel (ie sum of of queue depth is irrelevant). The other ones are relevant.
I don't think we should change this, it would just create confusion with users. That's a nack to me, let me know if unclear.
Thanks
Nic
> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Friday, July 17, 2026 2:30 AM
> To: dev at dpdk.org
> Cc: stable at dpdk.org; Chautru, Nicolas <nicolas.chautru at intel.com>; Maxime
> Coquelin <maxime.coquelin at redhat.com>; Akhil Goyal <gakhil at marvell.com>
> Subject: [PATCH 01/10] bbdev: fix stats aggregation from queues
>
> The device stats retrieval was missing aggregation of enqueue_status_count,
> acc_offload_cycles, and enqueue_depth_avail from per-queue statistics.
>
> Fixes: 4f08028c5e24 ("bbdev: expose queue related warning and status")
> Cc: stable at dpdk.org
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
> lib/bbdev/rte_bbdev.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index
> ea644c1f9b..90095578cb 100644
> --- a/lib/bbdev/rte_bbdev.c
> +++ b/lib/bbdev/rte_bbdev.c
> @@ -745,7 +745,7 @@ rte_bbdev_queue_stop(uint16_t dev_id, uint16_t
> queue_id) static void get_stats_from_queues(struct rte_bbdev *dev, struct
> rte_bbdev_stats *stats) {
> - unsigned int q_id;
> + unsigned int i, q_id;
> for (q_id = 0; q_id < dev->data->num_queues; q_id++) {
> struct rte_bbdev_stats *q_stats =
> &dev->data->queues[q_id].queue_stats;
> @@ -756,6 +756,10 @@ get_stats_from_queues(struct rte_bbdev *dev, struct
> rte_bbdev_stats *stats)
> stats->dequeue_err_count += q_stats->dequeue_err_count;
> stats->enqueue_warn_count += q_stats->enqueue_warn_count;
> stats->dequeue_warn_count += q_stats->dequeue_warn_count;
> + for (i = 0; i < RTE_BBDEV_ENQ_STATUS_SIZE_MAX; i++)
> + stats->enqueue_status_count[i] += q_stats-
> >enqueue_status_count[i];
> + stats->acc_offload_cycles += q_stats->acc_offload_cycles;
> + stats->enqueue_depth_avail += q_stats->enqueue_depth_avail;
> }
> rte_bbdev_log_debug("Got stats on %u", dev->data->dev_id); }
> --
> 2.54.0
More information about the dev
mailing list