You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
natstacklat: Initialize the TAI-offset from user space
Make the user space loader calculate the TAI-offset at startup and set
it as a constant for the eBPF programs. Split the open and loading
stages of the eBPF programs apart to enable setting constants in the
eBPF programs.
Note that on some systems (e.g. most debian systems by default), the
TAI offset may (incorrectly) be 0, so that CLOCK_TAI becomes identical
to CLOCK_REALTIME. While this is principly incorrect, it does not pose
an issue for netstacklat, as it only needs the TAI offset to translate
CLOCK_TAI to CLOCK_REALTIME (which skb->tstamp is assumed to use as
clock basis). Therefore, netstacklat will (from this commit) work
correctly even if the TAI offset is not correctly set on the system.
Limitation: The TAI offset is only set once the program is first
loaded, and is not dynamically updated in case the TAI offset
changes. So if the program is running while a leap second occurs, the
recorded latencies may be off with one second. Furthermore, as the TAI
offset is set from user space, it will not work when just using the
eBPF portion together with ebpf-exporter.
Signed-off-by: Simon Sundberg <[email protected]>
0 commit comments