As can be seen in the socket man page, one can use SO_TIMESTAMP
with setsockopt
to
measure the amount of time it takes the Linux kernel to hand a received network packet off to user space.
There is a good description of this functionality here: Measuring latency in the Linux network stack between kernel and user space.
Is there any way to get a reading of the tsc
rather than a timeval
at the time the kernel received a packet?