On Thu, Apr 03, 2025 at 09:50:41AM -0400, LukeSeewald wrote:
> There are various counters/stats coming from ice_stats_get that appear
> to only use 32 or 40 bits and once it hits that limit it "overflows"
> and resets. This was causing large spikes (sudden 2^42 increase from
> one second to the next) in values of ibytes and obytes, while causing
> sudden drops in opackets and ipackets (as they "overflow" and reset).
> The sudden spike in bytes is due to the packets count being multiplied
> by 4 (crc bytes) and subtracted from the byte count. E.g. One second
> the packet count could be just under the 40 bit limit, subtracting a
> very large number from the byte count and then in the next second hit
> the limit, "overflow" and reset subtracting a very small number, thus
> causing the byte counts to appear as if there was a large increase in a
> single second.
>
> This patch fixes the issue by enlarging the limitations of any counters
> or stats used by ice_stats_get to 64 bits, following the pattern of a
> previous patch -
> https://mails.dpdk.org/archives/stable/2020-July/023940.html
>
> Signed-off-by: LukeSeewald <luke.seew...@gmail.com>
> ---
> drivers/net/intel/ice/ice_ethdev.c | 103 +++++++++++++++++++++--------
> drivers/net/intel/ice/ice_ethdev.h | 44 ++++++++++--
> 2 files changed, 115 insertions(+), 32 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richard...@intel.com>