Re: [PATCH net-next RFC 1/1] ptp: use extts interface for the measured external offset

From: Jacob Keller
Date: Mon Nov 13 2023 - 18:00:26 EST




On 11/13/2023 1:50 PM, Min Li wrote:
> From: Min Li <min.li.xe@xxxxxxxxxxx>
>
> This change is for the PHC devices that can measure the
> phase offset between PHC signal and the external signal, such
> as GNSS. With this change, ts2phc can use the existing extts
> interface to retrieve measurement offset so that the alignment
> between PHC and the external signal can be achieved.
>
> Signed-off-by: Min Li <min.li.xe@xxxxxxxxxxx>
> ---

Ok, so this adds a new event type "extoff" which is for eternal
timestamp offset, and it allows reporting the offset instead of the raw
time.

Userspace can request this feature via the new PTP_EXT_OFFSET flag, and
drivers will report it as a new event type.

You mention GNSS, but is there an example or a link to a driver change
you could provide to show its use?

I think the concept seems reasonable and the code seems correct.

Thanks,
Jake