summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
diff options
context:
space:
mode:
authorMichael Chan <michael.chan@broadcom.com>2020-05-26 00:41:17 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-27 06:30:47 +0300
commitb8056e8434b037fdab08158fea99ed7bc8ef3a74 (patch)
treea4521f1f9dec8adcd94c68a840a7218389351326 /drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
parent591612aa578cd7148b7b9d74869ef40118978389 (diff)
downloadlinux-b8056e8434b037fdab08158fea99ed7bc8ef3a74.tar.xz
bnxt_en: Fix accumulation of bp->net_stats_prev.
We have logic to maintain network counters across resets by storing the counters in bp->net_stats_prev before reset. But not all resets will clear the counters. Certain resets that don't need to change the number of rings do not clear the counters. The current logic accumulates the counters before all resets, causing big jumps in the counters after some resets, such as ethtool -G. Fix it by only accumulating the counters during reset if the irq_re_init parameter is set. The parameter signifies that all rings and interrupts will be reset and that means that the counters will also be reset. Reported-by: Vijayendra Suman <vijayendra.suman@oracle.com> Fixes: b8875ca356f1 ("bnxt_en: Save ring statistics before reset.") Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c')
0 files changed, 0 insertions, 0 deletions