I am running into a strange problem with timestamping packets on loopback
I calculate the RTT for each outgoing TCP packet by timestamping each skb
after tcp_transmit_skb returns successfully, and timestamping the
corresponding ack in tcp_ack (actually netif_rx timestamps incoming skbs
so I use that whenever it is available). However, I have noticed
that sometimes, the timestamp for an ack comes before the timestamp for
the trasnmitted skb that is being acked.
I have instrumented the code in net/core/dev.c, and it seems that indeed
the corresponding ack would sometimes be generated by the receiver,
received and timestamped by netif_rx before tcp_transmit_skb returns.
I have a dual Xeon 2.66Ghz machine with Redhat 7.3 base install + 2.4.22
kernel (SMP enabled) from kernel.org. The network driver is e1000 without
Any ideas on why this happens?