From owner-svn-src-all@freebsd.org Fri Dec 11 06:23:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31A7A9D6675; Fri, 11 Dec 2015 06:23:00 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E73BF133A; Fri, 11 Dec 2015 06:22:59 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBB6MxdT036474; Fri, 11 Dec 2015 06:22:59 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBB6Mw8d036471; Fri, 11 Dec 2015 06:22:58 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201512110622.tBB6Mw8d036471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Fri, 11 Dec 2015 06:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292087 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 06:23:00 -0000 Author: hiren Date: Fri Dec 11 06:22:58 2015 New Revision: 292087 URL: https://svnweb.freebsd.org/changeset/base/292087 Log: Clean up unused bandwidth entry in the TCP hostcache. Submitted by: Jason Wolfe (j at nitrology dot com) Reviewed by: rrs, hiren Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D4154 Modified: head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_hostcache.h head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Fri Dec 11 06:20:31 2015 (r292086) +++ head/sys/netinet/tcp_hostcache.c Fri Dec 11 06:22:58 2015 (r292087) @@ -32,8 +32,8 @@ * table to a dedicated structure indexed by the remote IP address. It keeps * information on the measured TCP parameters of past TCP sessions to allow * better initial start values to be used with later connections to/from the - * same source. Depending on the network parameters (delay, bandwidth, max - * MTU, congestion window) between local and remote sites, this can lead to + * same source. Depending on the network parameters (delay, max MTU, + * congestion window) between local and remote sites, this can lead to * significant speed-ups for new TCP connections after the first one. * * Due to the tcp_hostcache, all TCP-specific metrics information in the @@ -440,7 +440,6 @@ tcp_hc_get(struct in_conninfo *inc, stru hc_metrics_lite->rmx_ssthresh = hc_entry->rmx_ssthresh; hc_metrics_lite->rmx_rtt = hc_entry->rmx_rtt; hc_metrics_lite->rmx_rttvar = hc_entry->rmx_rttvar; - hc_metrics_lite->rmx_bandwidth = hc_entry->rmx_bandwidth; hc_metrics_lite->rmx_cwnd = hc_entry->rmx_cwnd; hc_metrics_lite->rmx_sendpipe = hc_entry->rmx_sendpipe; hc_metrics_lite->rmx_recvpipe = hc_entry->rmx_recvpipe; @@ -555,14 +554,6 @@ tcp_hc_update(struct in_conninfo *inc, s (hc_entry->rmx_ssthresh + hcml->rmx_ssthresh) / 2; TCPSTAT_INC(tcps_cachedssthresh); } - if (hcml->rmx_bandwidth != 0) { - if (hc_entry->rmx_bandwidth == 0) - hc_entry->rmx_bandwidth = hcml->rmx_bandwidth; - else - hc_entry->rmx_bandwidth = - (hc_entry->rmx_bandwidth + hcml->rmx_bandwidth) / 2; - /* TCPSTAT_INC(tcps_cachedbandwidth); */ - } if (hcml->rmx_cwnd != 0) { if (hc_entry->rmx_cwnd == 0) hc_entry->rmx_cwnd = hcml->rmx_cwnd; @@ -612,7 +603,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) SBUF_INCLUDENUL); sbuf_printf(&sb, - "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " + "\nIP address MTU SSTRESH RTT RTTVAR " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); #define msec(u) (((u) + 500) / 1000) @@ -621,8 +612,8 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { sbuf_printf(&sb, - "%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu " - "%4lu %4lu %4i\n", + "%-15s %5lu %8lu %6lums %6lums %8lu %8lu %8lu %4lu " + "%4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : #ifdef INET6 ip6_sprintf(ip6buf, &hc_entry->ip6), @@ -635,7 +626,6 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) (RTM_RTTUNIT / (hz * TCP_RTT_SCALE))), msec(hc_entry->rmx_rttvar * (RTM_RTTUNIT / (hz * TCP_RTTVAR_SCALE))), - hc_entry->rmx_bandwidth * 8, hc_entry->rmx_cwnd, hc_entry->rmx_sendpipe, hc_entry->rmx_recvpipe, Modified: head/sys/netinet/tcp_hostcache.h ============================================================================== --- head/sys/netinet/tcp_hostcache.h Fri Dec 11 06:20:31 2015 (r292086) +++ head/sys/netinet/tcp_hostcache.h Fri Dec 11 06:22:58 2015 (r292087) @@ -57,7 +57,6 @@ struct hc_metrics { u_long rmx_ssthresh; /* outbound gateway buffer limit */ u_long rmx_rtt; /* estimated round trip time */ u_long rmx_rttvar; /* estimated rtt variance */ - u_long rmx_bandwidth; /* estimated bandwidth */ u_long rmx_cwnd; /* congestion window */ u_long rmx_sendpipe; /* outbound delay-bandwidth product */ u_long rmx_recvpipe; /* inbound delay-bandwidth product */ Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Fri Dec 11 06:20:31 2015 (r292086) +++ head/sys/netinet/tcp_var.h Fri Dec 11 06:22:58 2015 (r292087) @@ -335,7 +335,6 @@ struct hc_metrics_lite { /* must stay in u_long rmx_ssthresh; /* outbound gateway buffer limit */ u_long rmx_rtt; /* estimated round trip time */ u_long rmx_rttvar; /* estimated rtt variance */ - u_long rmx_bandwidth; /* estimated bandwidth */ u_long rmx_cwnd; /* congestion window */ u_long rmx_sendpipe; /* outbound delay-bandwidth product */ u_long rmx_recvpipe; /* inbound delay-bandwidth product */