feature: add hardware RX timestamp support
ddrown opened this issue ยท 6 comments
Right now, this code is using SO_TIMESTAMPNS/SO_TIMESTAMP, which use kernel level RX timestamps. The documentation and code comment state "hardware timestamps", which is misleading. These timestamps come from https://elixir.bootlin.com/linux/latest/C/ident/net_timestamp_check while "hardware timestamps" would come from 1588 timer hardware in the NIC itself.
https://www.kernel.org/doc/Documentation/networking/timestamping.txt has documentation on the SO_TIMESTAMPING flag, which accepts SOF_TIMESTAMPING_RX_HARDWARE. NIC 1588 hardware timers are usually not synchronized to system time, so your software would need to do that as well. chrony has an example of all of this.
This is just the RX timestamps. TX timestamps could be enabled in NTP interleaved mode, but that would mean keeping state per client. I'm assuming keeping state per client would conflict with the other goals of this project.
Thanks for reporting it!
I think it is better to leave this open in case we want to add HW timestamps.
@pmazzini I wanted to close it on Monday once we release the rpms.
RPMs are released, feature is working in prod. Closing.