]> 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)
commita4c9b47e42ceee6ef03ee7e4772623c16993ed4f
tree7ee6ad280d84c2de94c56cdf96386c06b6dc3fb6
parentd9f401bc5dfe4ad73377ad31b3d8443e4b5f238b
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