I need to measure the latency between a single UDP packet arriving on a Ethernet port (i.e. interrupt generated) and the time this packet is delivered to the user-level (i.e. the read() syscall unblocked).
This time can be measured by timestamping times through the SIOCGSTAMP ioctl (kernel-level) and clock_gettime (user-level). However, I'm interested in understanding how this latency can be measured through the ftrace command.