Skip to content

Commit

Permalink
ionic: fix gathering of debug stats
Browse files Browse the repository at this point in the history
[ Upstream commit c23bb54 ]

Don't print stats for which we haven't reserved space as it can
cause nasty memory bashing and related bad behaviors.

Fixes: aa62099 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
emusln authored and gregkh committed Oct 7, 2021
1 parent 477e7f6 commit 27b9ff8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/net/ethernet/pensando/ionic/ionic_stats.c
Expand Up @@ -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)++;
Expand Down

0 comments on commit 27b9ff8

Please sign in to comment.