|
Time stamping TCP packets at the device driver level
I'm currently doing some latency timings on some code I've written.
I'm trying to determine the time taken from receipt of a packet by the network device driver until the packet is handled by my code.
To do this, I am going to send a stream of known TCP messages to the machine. I will then modify the device driver to add a time-stamp to the data section of all incoming TCP messages. This can then be compared with with the system time when the packet is received by my application.
I have found the location in the device driver where it allocates incoming packets to the sk_buff structure, but I have two problems to overcome before I can implement my proposed solution.
1) When is the transport protocol of an incoming packet determined?
2) How can I determine the transport protocol of an sk_buff structure?
Thanks in advance for any help,
Will
|