0

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.

Claudio
  • 10,614
  • 4
  • 31
  • 71

1 Answers1

0

If you see the ftrace output here:

Track a packet as it goes through the kernel (linux)

and this:

Path of UDP packet in linux kernel

carefully, you will notice that timing information is also printed on the left hand side of the ftrace output. In this way you can get very finegrained timing analysis between various functions in the networking stack.

Community
  • 1
  • 1
Peter Teoh
  • 6,337
  • 4
  • 42
  • 58
  • Thank you. The example, however, doesn't seem to timestamp the time at which the hw interrupt arrived. Does it ? – Claudio Dec 21 '15 at 08:39