Skip to contentSkip to conversation

net/ice: enlarge limits to 64 bits (ice_stats_get)

PATCH Applied Bruce Richardson 1 participant 2 messages May 12, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Bruce Richardson

author Acked-by
#1 lore raw
Quoted 18 lines · LukeSeewald

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

Quoted 6 lines
---
 drivers/net/intel/ice/ice_ethdev.c | 103 +++++++++++++++++++++--------
 drivers/net/intel/ice/ice_ethdev.h |  44 ++++++++++--
 2 files changed, 115 insertions(+), 32 deletions(-)
author Applied
#2 lore raw
Quoted 19 lines · Bruce Richardson
Quoted 18 lines · LukeSeewald

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

Quoted 8 lines
Quoted 6 lines
---
 drivers/net/intel/ice/ice_ethdev.c | 103 +++++++++++++++++++++--------
 drivers/net/intel/ice/ice_ethdev.h |  44 ++++++++++--
 2 files changed, 115 insertions(+), 32 deletions(-)

Applied to dpdk-next-net-intel.
Thanks,
/Bruce