The actual ptp4l implementation rearms timers on timeut. This doesn't permit to have a precise TX SYNC message scheduling. The following patchset uses non blocking timers and only for TX SYNC timer a periodic timer is used. In addition, a periodic timer requires to read (and flush) the file descriptor and a new timerfd_flush() function has been introduced for this.
e2e_tc.c | 28 +++++++++++++++++++++------- fd.h | 4 ++-- p2p_tc.c | 28 +++++++++++++++++++++------- port.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------ port.h | 10 ++++++++++ raw.c | 4 ++-- udp.c | 4 ++-- udp6.c | 4 ++-- 8 files changed, 132 insertions(+), 52 deletions(-) [PATCH 1/6] Use constant FD_EVENT and FD_GENERAL instead numeric [PATCH 2/6] Rearrange the fdarray in order to serve timers before [PATCH 3/6] Flush timer fd after expiration [PATCH 4/6] Split announce/sync_rx timer rearm on expiration fd [PATCH 5/6] Use Non-blocking timer file descriptors [PATCH 6/6] Use periodic timer for TX SYNC timeout _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel