On Fri, 4 Nov 2022 20:18:40 +0000 Russell King (Oracle) wrote: > I guess we'll need phylink to support this as well, so phylink using > drivers can provide this statistic not only for phylib based PHYs, but > also for direct SFP connections as well. > > Thinking about the complexities of copper SFPs that may contain a PHY, > it seems to me that the sensible implementation would be for phylink > to keep the counter and not use the phylib counter (as that PHY may > be re-plugged and thus the count can reset back to zero) which I > suspect userspace would not be prepared for. Makes sense, having the counter go back on a netdev could be highly confusing for local detection. How would you like to proceed? I can try to take a stab at a phylink implementation but a stab it will be.