Fixed bug in RTT measurement

git-svn-id: svn://kolibrios.org@2948 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2012-08-28 10:01:56 +00:00
parent a033334ecb
commit 57c5115037
2 changed files with 8 additions and 4 deletions

View File

@ -590,7 +590,7 @@ TCP_input:
.no_excess_data:
;-----------------
; Record timestamp (737-746) TODO
; Record timestamp (737-746)
; If last ACK falls within this segments sequence numbers, record its timestamp
test [ebx + TCP_SOCKET.temp_bits], TCP_BIT_TIMESTAMP
@ -605,6 +605,8 @@ TCP_input:
sub eax, ecx
jae .no_timestamp
DEBUGF 1,"Recording timestamp\n"
mov eax, [esp + 4+4] ; tcp_now
mov [ebx + TCP_SOCKET.ts_recent_age], eax
mov eax, [ebx + TCP_SOCKET.ts_val]
@ -736,7 +738,7 @@ TCP_input:
DEBUGF 1,"TCP_input: Processing duplicate ACK\n"
; If we have outstanidn data, other than a window probe, this is a completely duplicate ACK
; If we have outstanding data, other than a window probe, this is a completely duplicate ACK
; (window info didnt change) The ACK is the biggest we've seen and we've seen exactly our rexmt threshold of them,
; assume a packet has been dropped and retransmit it. Kludge snd_nxt & the congestion window so we send only this one packet.
@ -853,7 +855,7 @@ TCP_input:
; If we have a timestamp, update smoothed RTT
test [ebx + TCP_SOCKET.temp_bits], TCP_BIT_TIMESTAMP
jne .timestamp_not_present
jz .timestamp_not_present
mov eax, [esp+4+4]
sub eax, [ebx + TCP_SOCKET.ts_ecr]
inc eax

View File

@ -506,6 +506,8 @@ macro TCP_set_persist socket {
align 4
TCP_xmit_timer:
DEBUGF 1,"TCP_xmit_timer: socket=%x rtt=%d0ms\n", ebx, eax
;TODO: update stats
cmp [ebx + TCP_SOCKET.t_rtt], 0