]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ionic: fix gathering of debug stats
authorShannon Nelson <snelson@pensando.io>
Mon, 27 Sep 2021 21:07:18 +0000 (14:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Sep 2021 12:19:57 +0000 (13:19 +0100)
Don't print stats for which we haven't reserved space as it can
cause nasty memory bashing and related bad behaviors.

Fixes: aa99a2388b1a ("ionic: pull per-q stats work out of queue loops")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_stats.c

index 58a854666c62b1d2a424df87442c4c57f0709c88..c14de5fcedea37c474e07e38b2ae33953ced0307 100644 (file)
@@ -380,15 +380,6 @@ static void ionic_sw_stats_get_txq_values(struct ionic_lif *lif, u64 **buf,
                                          &ionic_dbg_intr_stats_desc[i]);
                (*buf)++;
        }
-       for (i = 0; i < IONIC_NUM_DBG_NAPI_STATS; i++) {
-               **buf = IONIC_READ_STAT64(&txqcq->napi_stats,
-                                         &ionic_dbg_napi_stats_desc[i]);
-               (*buf)++;
-       }
-       for (i = 0; i < IONIC_MAX_NUM_NAPI_CNTR; i++) {
-               **buf = txqcq->napi_stats.work_done_cntr[i];
-               (*buf)++;
-       }
        for (i = 0; i < IONIC_MAX_NUM_SG_CNTR; i++) {
                **buf = txstats->sg_cntr[i];
                (*buf)++;