]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: implement polling for hardware counters 18415/head
authorJan Hoffmann <jan@3e8.eu>
Tue, 29 Apr 2025 22:02:00 +0000 (00:02 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 27 Jul 2025 14:46:20 +0000 (16:46 +0200)
commitec697362707145058080c14a51f59edc521aa726
tree0edeb0371181ce790080096162a5f2cce4b04b88
parentfa63a5365ed905396bdae3bd91c35df6999a08ac
realtek: implement polling for hardware counters

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>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h