Subject: Re: rtt in freebsd

From: Mark Allman <[email-masked]>
Date: Tue, 03 Dec 2002 08:29:53 -0500

------- Forwarded Message

Date: Thu, 28 Nov 2002 10:47:00 -0600
From: Jonathan Lemon <[email-masked]>
To: Gokul Poduval <[email-masked]>
Cc: [email-masked]
Subject: Re: rtt in freebsd

>From tcp_input.c:

                /*
                 * srtt is stored as fixed point with 5 bits after the
                 * binary point (i.e., scaled by 8).  The following magic
                 * is equivalent to the smoothing algorithm in rfc793 with
                 * an alpha of .875 (srtt = rtt/8 + srtt*7/8 in fixed
                 * point).  Adjust rtt to origin 0.
                 */

srtt is the smoothed RTT.
rtttime is the current tick value, and is used for timing segments.
- -- 
Jonathan

On Thu, Nov 28, 2002 at 07:01:46PM +0800, Gokul Poduval wrote:
> Hello, 
> 
>    In the tcpcb structure in freebsd (release 4.5), what variable
> maintains the instantaneous rtt ? I tried printing tp->t_rtttime in the
> congestion avoidance section in tcp_input.c, but it always seems to be
> 0. 
>    tp->t_srtt seems to reflect a more accurate value of rtt, but its
> value seems to be 10 times of what the actual rtt is. (if the rtt is
> 60ms, srtt is ~600). 
> 
> -- 
> 
> Gokul Poduval
> http://www.comp.nus.edu.sg/~gokulpod

------- End of Forwarded Message