|
From: | Bonny Gijzen |
Subject: | [lwip-users] RTO calculated to 0 msec ??? (follow-up) |
Date: | Fri, 12 Nov 2004 10:39:00 +0100 |
Hi again,
After examining the log some more I also noticed
that the RTT measurement behaves incorrectly.
Mostly I get a string like this in my
log:
tcp_receive: experienced rtt 0 ticks (0
msec).
or
tcp_receive: experienced rtt 1 ticks (500
msec).
or
tcp_receive: experienced rtt 2 ticks (1000
msec).
But after 1 day of running (or so) I see
this:
tcp_receive: experienced rtt 65537 ticks (32768500
msec).
And it never gets back again to a LOW
value.
It seems there is an offset of 65536 added to the
measured RTT value.
I have examined the tcp_in.c code and noticed this: m = tcp_ticks - pcb->rttest;
So when the segment is sent away the ->rttest
value is set to tcp_ticks,
and on receiption of the ACK the difference of
->rttest and the current tcp_ticks value is calculated and stored in m.
(=response time, expressed in timerticks (=500msec))
There are 2 things which strike me:
1) How is WRAP AROUND handled?
2) All 3 variables are differently
defined:
int
m;
u32_t tcp_ticks;
u16_t rttest;
I think the offset of 65536 is directly related to
the above formula and the definition of the variables themselves. I will add
some more debug code and log again to see exactly what
happens.
Can somebody have a look at this and perhaps explain a little of it? Thanks Bonny
|
[Prev in Thread] | Current Thread | [Next in Thread] |