Files
openwrt/target/linux
Markus Stockhausen f5e8002b17 realtek: dsa: move private drop counters into stats
The legacy debugfs implementation selects private diagnostic registers by
family at read time. Move these switch-wide counters into stats.c and
select immutable counter descriptors through priv->r->drop_desc.

Keep an explicit register offset for each of the 246 retained counters.
Omit the RTL838x bridge learned-entry discard counter at 0x6a9c and the
four reserved slots on RTL930x/RTL931x. All retained counters are 16-bit,
so a single OTTO_DROP macro and a common read path suffice. Correct two
RTL930x counter labels.

Expose a read-only realtek_otto_stats/drop_counters file. Serialize register
reads with reg_mutex, propagate regmap failures, and remove the debugfs
interface before switch teardown. A devm action also covers resource
cleanup; unavailable debugfs does not prevent switch operation. The fixed
root is owned by one device and is never reused by another instance.

Remove the legacy drop-counter data, reader and registrations. Other
legacy debugfs features and existing MIB exports are unchanged.

Assisted-by: ChatGPT (OpenAI GPT-6 Astra)
Link: https://github.com/openwrt/openwrt/pull/25931
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-10-18 08:03:20 +02:00
..
2026-10-16 15:51:00 +02:00
2026-10-06 18:35:40 +01:00
2026-10-18 00:02:33 +02:00
2026-10-13 08:53:12 +02:00
2026-10-12 19:11:56 +02:00
2026-10-01 00:49:54 +02:00
2026-10-06 18:35:40 +01:00
2026-10-01 00:50:42 +02:00
2026-08-13 00:22:31 +02:00
2026-10-01 00:49:54 +02:00
2026-10-17 23:46:36 +02:00
2026-10-06 18:35:40 +01:00