FFclock contribution to CURRENT

From: Darryl Veitch <Darryl.Veitch_at_uts.edu.au>
Date: Thu, 07 Dec 2023 01:08:32 UTC
Dear potential reviewers,

This post is to provide some background for the submission of a branch, FFclock_completion (10 ordered commits), to Phabricator for review. The FFclock code provides support for an alternative feedforward based timekeeping paradigm for the system clock. It originates from a project<https://freebsdfoundation.org/project/feed-forward-clock-synchronization-algorithms/>
supported by the FreeBSD foundation and has been in the kernel since 10.0 (lying principally in /sys/kern/kern_{tc,ffclock}.c).  The commits extend, correct and complete the support, in particular regarding bpf based timestamping with expanded capabilities.

The origins of the FFclock work lie in the kernel support developed as part of the RADclock (Robust Absolute and Difference clock) project for robust and accurate Internet timekeeping. The FFclock support is generic wrt feedforward clocks, but is inspired by the RADclock design. The RADclock project, now homed under github.com/RADicalsync/RADclock<http://github.com/RADicalsync/>, represents a reference daemon for the FFclock system clock, and the RADclock codebase and the FFclock support have continued to be developed together, privately within my research group until now.

The RADclock binary itself, and the test programs included with the RADclock repo (which also includes the kernel files containing FFclock code for both FreeBSD and Debian Linux), have been used to extensively test the proposed commits. For example a continuously operating timing testbed is powered by FreeBSD 13.1 kernels with FFclock support, synchronized to RADclock daemons. Further information on the RADclock project (including links to 20+ related academic papers), can be found at https://tklab.feit.uts.edu.au/~darryl/  .

In addition to the commit messages, and the man pages bpf.4 and ffclock.{2,4} contained in the commits, much more detail on the FFclock code, and the FFclock <—> daemon API, can be found under the Documentation directory of the RADclock repo, in particular Documentation/FFclockDoc_FreeBSD.txt
(colorize this as C to make the code snippets readable).

Darryl Veitch

Professor Darryl Veitch
FEIT, University of Technology Sydney (UTS)

UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. Think. Green. Do. Please consider the environment before printing this email.