net.inet.tcp.hostcache.list: RTTVAR value



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

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,
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"

Relevant Pages