Files
linux/include/uapi/linux
Mahesh Bandewar c259acab83 ptp/ioctl: support MONOTONIC{,_RAW} timestamps for PTP_SYS_OFFSET_EXTENDED
The ability to read the PHC (Physical Hardware Clock) alongside
multiple system clocks is currently dependent on the specific
hardware architecture. This limitation restricts the use of
PTP_SYS_OFFSET_PRECISE to certain hardware configurations.

The generic soultion which would work across all architectures
is to read the PHC along with the latency to perform PHC-read as
offered by PTP_SYS_OFFSET_EXTENDED which provides pre and post
timestamps.  However, these timestamps are currently limited
to the CLOCK_REALTIME timebase. Since CLOCK_REALTIME is affected
by NTP (or similar time synchronization services), it can
experience significant jumps forward or backward. This hinders
the precise latency measurements that PTP_SYS_OFFSET_EXTENDED
is designed to provide.

This problem could be addressed by supporting MONOTONIC_RAW
timestamps within PTP_SYS_OFFSET_EXTENDED. Unlike CLOCK_REALTIME
or CLOCK_MONOTONIC, the MONOTONIC_RAW timebase is unaffected
by NTP adjustments.

This enhancement can be implemented by utilizing one of the three
reserved words within the PTP_SYS_OFFSET_EXTENDED struct to pass
the clock-id for timestamps.  The current behavior aligns with
clock-id for CLOCK_REALTIME timebase (value of 0), ensuring
backward compatibility of the UAPI.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-09-08 18:40:33 +01:00
..
2024-04-15 13:42:38 +02:00
2024-04-08 14:10:45 +01:00
2024-06-11 12:57:49 -05:00
2024-03-07 17:14:53 +00:00
2024-05-10 08:26:31 +02:00
2024-05-07 01:35:57 +02:00
2024-05-07 01:35:57 +02:00
2024-04-01 10:49:28 +01:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2024-06-01 07:28:21 +02:00
2024-02-15 23:43:47 -05:00
2023-12-15 17:01:30 +01:00
2024-05-30 12:15:56 +02:00
2024-08-12 17:50:34 -07:00
2024-08-12 22:03:26 +02:00
2023-11-28 19:05:16 +00:00
2024-05-16 18:14:09 -05:00
2023-12-20 19:26:31 -05:00
2024-02-28 18:47:08 -07:00
2023-12-29 11:58:24 -08:00
2024-04-22 17:07:13 -04:00