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 <[email protected]> > Sent: Friday, July 17, 2026 2:30 AM > To: [email protected] > Cc: [email protected]; Chautru, Nicolas <[email protected]>; Maxime > Coquelin <[email protected]>; Akhil Goyal <[email protected]> > 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: [email protected] > > Signed-off-by: David Marchand <[email protected]> > --- > 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

