Subject: Re: [PATCH net-next v3 1/3] phy: open_alliance_helpers: Add defines for link quality metrics

From: Jakub Kicinski <[email-masked]>
Date: Mon, 26 Aug 2024 12:57:19 -0700

On Mon, 26 Aug 2024 19:12:52 +0200 Andrew Lunn wrote:
> > If these are defined by a standard why not report them as structured
> > data? Like we report ethtool_eth_mac_stats, ethtool_eth_ctrl_stats,
> > ethtool_rmon_stats etc.?  
> 
> We could do, but we have no infrastructure for this at the
> moment. These are PHY statistics, not MAC statistics.
> We don't have all the ethool_op infrastructure, etc.

This appears to not be a concern when calling phy_ops->get_sset_count()
You know this code better than me, but I can't think of any big 'infra'
that we'd need. ethtool code can just call phy_ops, the rest is likely
a repeat of the "MAC"/ethtool_ops stats.

> We also need to think about which PHY do we want the statics from,
> the bootlin code for multiple PHYs etc.

True, that said I'd rather we added a new group for the well-defined
PHY stats without supporting multi-PHY, than let the additional
considerations prevent us from making progress. ioctl stats are
strictly worse.

I'm sorry to pick on this particular series, but the structured ethtool
stats have been around for 3 years. Feels like it's time to fill the
gaps on the PHY side.