]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Accumulate all counters.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 27 Jul 2020 09:40:43 +0000 (05:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2020 18:47:33 +0000 (11:47 -0700)
commit60f6adc6bb021b610dc527e59601a77966893d4d
tree7ee6ad280d84c2de94c56cdf96386c06b6dc3fb6
parent577c27e5940d6046b1bd1a0dab8056a89a197a81
bnxt_en: Accumulate all counters.

Now that we have the infrastructure in place, add the new function
bnxt_accumulate_all_stats() to periodically accumulate and check for
counter rollover of all ring stats and port stats.

A chip bug was also discovered that could cause some ring counters to
become 0 during DMA.  Workaround by ignoring zeros on the affected
chips.

Some older frimware will reset port counters during ifdown.  We need
to check for that and free the accumulated port counters during ifdown
to prevent bogus counter overflow detection during ifup.

Reviewed-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h