]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: use more specific APIs for ethtool stats where possible
authorJan Hoffmann <jan@3e8.eu>
Fri, 25 Apr 2025 18:10:36 +0000 (20:10 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 27 Jul 2025 14:46:19 +0000 (16:46 +0200)
commite27e6959781fe3abf768ed9fb1681678c5e65c1b
treee6954c8ab90440ba1924683676421664f44e579b
parent831c1cd864af6895270fb598185f2d04b3936401
realtek: use more specific APIs for ethtool stats where possible

The kernel offers several alternatives to get_ethtool_stats which allow
to report some stats in a more structured way. Use them where possible.

Ideally, we should follow RFC 3635 to translate the hardware counters to
the supported frame and octet counters. However, this is not feasible,
as some of the counters are 32-bit only (so it would produce incorrect
results as soon as one of them overflows).

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/rtl83xx.h