Re: [PATCH net-next v6] net: dlink: add support for reporting stats via `ethtool -S` and `ip -s -s link show`

From: Andrew Lunn
Date: Mon Apr 07 2025 - 16:48:35 EST



> Additionally, the previous code did not manage statistics
> in a structured manner, so this patch:
>
> 1. Added `u64` type stat counters to the `netdev_private` struct.
> 2. Defined a `dlink_stats` struct for managing statistics.
> 3. Registered standard statistics and driver-specific statistics
> separately.
> 4. Compressing repetitive tasks through loops.
>
> The code previously blocked by the `#ifdef MEM_MAPPING` preprocessor
> directive has been enabled. This section relates to RMON statistics and
> does not cause issues when activated. Removing unnecessary preprocessor
> directives simplifies the code path and makes it more intuitive.

When i see a list like this, it makes me think this should be broken
up into multiple patches. Ideally you want lots of simple patches
which are obviously correct.

Andrew