From owner-freebsd-questions@FreeBSD.ORG Wed Sep 8 14:14:51 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B6E8516A4CE for ; Wed, 8 Sep 2004 14:14:51 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D9DE43D5D for ; Wed, 8 Sep 2004 14:14:51 +0000 (GMT) (envelope-from shchoi@gmail.com) Received: by mproxy.gmail.com with SMTP id w67so93381cwb for ; Wed, 08 Sep 2004 07:14:46 -0700 (PDT) Received: by 10.11.117.2 with SMTP id p2mr246944cwc; Wed, 08 Sep 2004 07:14:46 -0700 (PDT) Received: by 10.11.117.28 with HTTP; Wed, 8 Sep 2004 07:14:46 -0700 (PDT) Message-ID: <34b425c5040908071424de6b7@mail.gmail.com> Date: Wed, 8 Sep 2004 15:14:46 +0100 From: Soo-Hyun Choi To: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: TCP RTO calculation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Soo-Hyun Choi List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 14:14:51 -0000 Hi, I'm not sure if this list is appropriate to ask the FreeBSD kernel source or not. If not, could somebody direct me in an appropriate list? My curiosity is if we see the tcp.cc code inside, there are two different version of srtt (smoothed rtt) and rttvar (smoothed mean deviation estimator). The one is simply 'srtt' and 'rttvar' and the other is 't_srtt' and 't_rttvar'. The unit of t_srtt is 'ticks * 8' and the unit of t_rttvar is 'ticks * 4'. These variables are used to calculate the TCP RTO. But why do they have the two different version of variables? The interesting thing is the 't_' variables are a fixed-point integer, and the original variables are just floating-point values. I assume the reason why they have is to avoid the floating-point arithmetic in the kernel. Is this really only reason for being two different version of those? Cheers, Soo-Hyun