* Linux 2.4.22 loopback question
@ 2004-05-05 21:53 Cheng Jin
2004-05-06 6:35 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Cheng Jin @ 2004-05-05 21:53 UTC (permalink / raw)
To: netdev
Hi,
I am running into a strange problem with timestamping packets on loopback
connections.
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
NAPI.
Any ideas on why this happens?
Many thanks,
Cheng
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Linux 2.4.22 loopback question
2004-05-05 21:53 Linux 2.4.22 loopback question Cheng Jin
@ 2004-05-06 6:35 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2004-05-06 6:35 UTC (permalink / raw)
To: Cheng Jin; +Cc: netdev
On Wed, May 05, 2004 at 02:53:41PM -0700, Cheng Jin wrote:
> 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.
Most likely because the network softirq runs in parallel in interrupt
context and picks up all the already queued packets. e.g. this
can be triggered when you receive a packet from ethernet.
-Adni
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-06 6:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-05 21:53 Linux 2.4.22 loopback question Cheng Jin
2004-05-06 6:35 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).