Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Jul 2012 19:30:06 +0300
From:      Mikolaj Golub <trociny@freebsd.org>
To:        freebsd-net@FreeBSD.org
Cc:        Andre Oppermann <andre@FreeBSD.org>
Subject:   net.inet.tcp.hostcache.list: RTTVAR value
Message-ID:  <86wr2no35d.fsf@kopusha.home.net>

next in thread | raw e-mail | index | archive | help
--=-=-=

Hi,

It looks for me that in the calculation of RTTVAR value for
net.inet.tcp.hostcache.list sysctl a wrong scale is used: TCP_RTT_SCALE
instead of TCP_RTTVAR_SCALE. See the attached patch. I am going to commit it
if nobody tell me that I am wrong here.

-- 
Mikolaj Golub


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=tcp_hostcache.c.rttvar.patch

Index: sys/netinet/tcp_hostcache.c
===================================================================
--- sys/netinet/tcp_hostcache.c	(revision 237918)
+++ sys/netinet/tcp_hostcache.c	(working copy)
@@ -624,7 +624,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS)
 			    msec(hc_entry->rmx_rtt *
 				(RTM_RTTUNIT / (hz * TCP_RTT_SCALE))),
 			    msec(hc_entry->rmx_rttvar *
-				(RTM_RTTUNIT / (hz * TCP_RTT_SCALE))),
+				(RTM_RTTUNIT / (hz * TCP_RTTVAR_SCALE))),
 			    hc_entry->rmx_bandwidth * 8,
 			    hc_entry->rmx_cwnd,
 			    hc_entry->rmx_sendpipe,

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wr2no35d.fsf>