Setting the SO_TIMESTAMP
or SO_TIMESTAMPNS
options using setsockopt()
enables software timestamping on TCP or UDP sockets. Functions such as cmesg()
, recvmsg()
and recvmmsg()
can then recover timestamps for packets received at the socket.
Onload implements a microsecond resolution software timestamping mechanism, which avoids the need for a per-packet system call thereby reducing the normal timestamp overheads.
Supported adapters will always deliver received packets to the receive ring buffer in the order that these arrive from the network. Onload will append a software timestamp to the packet meta data when it retrieves a packet from the ring buffer - before the packet is transferred to a waiting socket receive buffer.