Re: [PATCH RFC V1 net-next 2/4] net: Expose available time stamping layers to user space.

From: Russell King (Oracle)
Date: Mon Jan 03 2022 - 18:51:14 EST


On Mon, Jan 03, 2022 at 03:25:53PM -0800, Richard Cochran wrote:
> Time stamping on network packets may happen either in the MAC or in
> the PHY, but not both. In preparation for making the choice
> selectable, expose both the current and available layers via sysfs.
>
> In accordance with the kernel implementation as it stands, the current
> layer will always read as "phy" when a PHY time stamping device is
> present. Future patches will allow changing the current layer
> administratively.
>
> Signed-off-by: Richard Cochran <richardcochran@xxxxxxxxx>

Did you mean to introduce "selected_timestamping_layer" in this patch -
it appears to be a write only variable.

As it stands, it gets set to indicate PHY mode just by a network driver
binding to a PHY. If this gets used based on that decision to direct
where get_ts_info() goes, then this will break mvpp2 PTP.

I suggest that the introduction of "selected_timestamping_layer" is
moved to the patch where it's actually used for a better review.

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