Re: [PATCH v3 net-next 8/8] net: dsa: netc: add PTP one-step timestamping support

From: Jakub Kicinski

Date: Fri Sep 04 2026 - 20:54:21 EST


On Mon, 31 Aug 2026 16:23:35 +0800 wei.fang@xxxxxxxxxxx wrote:
> The NETC switch supports one-step TX timestamping for PTP Sync frames.
> When transmitting a Sync frame, the driver reads the current PTP time
> and writes it into the frame's originTimestamp field, and inserts a
> To_Port subtype 1 tag carrying the low 30 bits of that same PTP time.
> As the frame leaves the wire, the MAC captures the SFD transmit time
> and derives the residence time from the timestamp in the tag. It then
> reads the correction field at the offset given by
> PM_SINGLE_STEP[OFFSET], adds the residence time to it, and writes the
> result back.

Please spend more time on this code, especially this patch.
This really looks like clumsy slop, some DSA expert will
have to review it before it gets merged.