Re: [PATCH net-next v1 2/7] net: ethtool: add support for structured PHY statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 03, 2024 at 08:56:16AM +0100, Oleksij Rempel wrote:
> From: Jakub Kicinski <kuba@xxxxxxxxxx>
> 
> Introduce a new way to report PHY statistics in a structured and
> standardized format using the netlink API. This new method does not
> replace the old driver-specific stats, which can still be accessed with
> `ethtool -S <eth name>`. The structured stats are available with
> `ethtool -S <eth name> --all-groups`.
> 
> This new method makes it easier to diagnose problems by organizing stats
> in a consistent and documented way.
> 
> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
...
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 523195c724b5..20a0d43ab5d4 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -1097,7 +1097,8 @@ struct phy_driver {
>  	 * must only set statistics which are actually collected by the device.
>  	 */
>  	void (*get_phy_stats)(struct phy_device *dev,
> -			      struct ethtool_eth_phy_stats *eth_stats);
> +			      struct ethtool_eth_phy_stats *eth_stats,
> +			      struct ethtool_phy_stats *stats);

So we introduce a new function pointer in patch 1, and then change its
prototype in patch 2... wouldn't it be better to introduce the new
structure in patch 1, and then the function pointer in the next patch?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux