Re: [PATCH net-next v3 1/2] ptp: introduce PTP_CLOCK_EXTOFF event for the measured external offset

From: Richard Cochran
Date: Thu Dec 14 2023 - 13:38:59 EST


On Thu, Dec 14, 2023 at 11:36:24AM -0500, Min Li wrote:
> diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h
> index da700999c..66f4dd73a 100644
> --- a/include/uapi/linux/ptp_clock.h
> +++ b/include/uapi/linux/ptp_clock.h
> @@ -32,6 +32,7 @@
> #define PTP_RISING_EDGE (1<<1)
> #define PTP_FALLING_EDGE (1<<2)
> #define PTP_STRICT_FLAGS (1<<3)
> +#define PTP_EXT_OFFSET (1<<4)

This isn't going to work.

If user space enables time stamps twice, once with PTP_EXT_OFFSET and
once without, it won't be able to differentiate the two when it reads
a ptp_extts_event.

Thanks,
Richard