From owner-freebsd-net@FreeBSD.ORG Sun Jul 1 16:30:17 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79B3110656F4; Sun, 1 Jul 2012 16:30:17 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id B9DBF8FC17; Sun, 1 Jul 2012 16:30:16 +0000 (UTC) Received: by lbon10 with SMTP id n10so8208182lbo.13 for ; Sun, 01 Jul 2012 09:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:sender:date:message-id:user-agent:mime-version :content-type; bh=+zNDyxu475tYs8lkQecAQaW61pBDwmMEBGEFJRkw8Nk=; b=MOC/EEyUTnpUKR7WyFhmunwezXp3wnELI6WUvw4AXUnbGqVobZwlmnRtNBMxcetYd9 kBqlddkylYekT6IfNw514L2c2dUyDUH8i5rbZ9QKsnGCFxKye0WWS7nW8j4DqC1bqxsY tsldkQWW3vr8zK3PHGN02IGHmN4AuDlqVhF7i2Vc8tBzMQr/d+SS8XZAzo5BeL5anCB3 rs9UOfnxVz1+eErXKYGJPr50tsTkgLbYKglv7NeyXm6s3jpCl+EMOVEQ9PZJibt1bTox 8TLKEtLgF/JLnn5IvPbr83Pn2sVRg3RrvB4o/SgxAEsyzyjc/H0Qk7o9Ke++WOC5prLn Qo8A== Received: by 10.152.131.68 with SMTP id ok4mr9539283lab.47.1341160209698; Sun, 01 Jul 2012 09:30:09 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id j1sm8663518lby.8.2012.07.01.09.30.07 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 09:30:08 -0700 (PDT) From: Mikolaj Golub To: freebsd-net@FreeBSD.org Sender: Mikolaj Golub Date: Sun, 01 Jul 2012 19:30:06 +0300 Message-ID: <86wr2no35d.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Andre Oppermann Subject: net.inet.tcp.hostcache.list: RTTVAR value X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 16:30:17 -0000 --=-=-= 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, --=-=-=--