From: Ivan Ilchenko Date: Wed, 15 Sep 2021 10:40:17 +0000 (+0300) Subject: net/sfc: fix getting accumulative SW xstat X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=67f1b4f1742a6f6d7b481e7641ce3c006cbf68e5;p=dpdk.git net/sfc: fix getting accumulative SW xstat Add missing initialisation of the accumulative SW xstat to zero since it is sum of per-queue xstats. Fixes: fdd7719eb3c1 ("net/sfc: add xstats for Rx/Tx doorbells") Cc: stable@dpdk.org Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c index 8489b603f5..2b28ba29e6 100644 --- a/drivers/net/sfc/sfc_sw_stats.c +++ b/drivers/net/sfc/sfc_sw_stats.c @@ -313,6 +313,7 @@ sfc_sw_xstat_get_values_by_id(struct sfc_adapter *sa, } if (count_accum_value) { + values[accum_value_idx] = 0; for (qid = 0; qid < nb_queues; ++qid) { if (rte_bitmap_get(bmp, qid) != 0) continue;