mirror of
https://github.com/immortalwrt/immortalwrt.git
synced 2025-08-11 06:11:53 +08:00

Maintain 64 bit counters by polling the hardware counters and adding up the differences. Polling needs to happen just often enough to catch every single overflow. As we now have non-overflowing counters now, we can safely calculate composite counters without getting weird results on overflow. Use this to follow RFC 3635 more accurately by mapping the hardware counters to the proper counters, while taking into account hardware quirks as best as possible. Signed-off-by: Jan Hoffmann <jan@3e8.eu> Link: https://github.com/openwrt/openwrt/pull/18415 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>