From: Mohammad Shuab Siddique <[email protected]> Under heavy traffic and a high stats polling rate, firmware can return a STAT_CTX_QUERY value with a flipped bit, which shows up as a spurious jump in the reported counters.
Patch 1 applies the firmware-reported counter widths, has firmware DMA the counters periodically, and takes a bitwise majority of three samples on every read. Patch 2 enables the extended ring stats path on P5 so the same handling covers the TPA counters there. Keegan Freyhof (2): net/bnxt: harden ring stats against flipped bits net/bnxt: use extended ring stats on P5 doc/guides/rel_notes/release_26_11.rst | 2 + drivers/net/bnxt/bnxt.h | 90 ------- drivers/net/bnxt/bnxt_cpr.h | 7 +- drivers/net/bnxt/bnxt_ethdev.c | 24 +- drivers/net/bnxt/bnxt_hwrm.c | 337 +++++------------------ drivers/net/bnxt/bnxt_hwrm.h | 21 +- drivers/net/bnxt/bnxt_ring.c | 9 + drivers/net/bnxt/bnxt_rxq.c | 3 +- drivers/net/bnxt/bnxt_stats.c | 354 +++++++++++++++++++++++-- drivers/net/bnxt/bnxt_stats.h | 168 ++++++++++++ drivers/net/bnxt/bnxt_txr.c | 3 +- 11 files changed, 622 insertions(+), 396 deletions(-) -- 2.47.3

