From owner-svn-src-user@FreeBSD.ORG Thu Mar 1 15:08:58 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B03DF1065678; Thu, 1 Mar 2012 15:08:58 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C72A8FC19; Thu, 1 Mar 2012 15:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q21F8wQ9084150; Thu, 1 Mar 2012 15:08:58 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q21F8wUa084148; Thu, 1 Mar 2012 15:08:58 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201203011508.q21F8wUa084148@svn.freebsd.org> From: Andre Oppermann Date: Thu, 1 Mar 2012 15:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232341 - user/andre/tcp_workqueue/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2012 15:08:58 -0000 Author: andre Date: Thu Mar 1 15:08:58 2012 New Revision: 232341 URL: http://svn.freebsd.org/changeset/base/232341 Log: Adjust the default initial CWND upon connection establishment to the new and larger values specified by RFC5681 Section 3.1. The larger initial CWND per RFC3390, if enabled, is not affected. Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_input.c Thu Mar 1 14:42:06 2012 (r232340) +++ user/andre/tcp_workqueue/sys/netinet/tcp_input.c Thu Mar 1 15:08:58 2012 (r232341) @@ -347,8 +347,15 @@ cc_conn_init(struct tcpcb *tp) if (V_tcp_do_rfc3390) tp->snd_cwnd = min(4 * tp->t_maxseg, max(2 * tp->t_maxseg, 4380)); - else - tp->snd_cwnd = tp->t_maxseg; + else { + /* Per RFC5681 Section 3.1 */ + if (tp->t_maxseg > 2190) + tp->snd_cwnd = 2 * tp->t_maxseg; + if (tp->t_maxseg > 1095) + tp->snd_cwnd = 3 * tp->t_maxseg; + else + tp->snd_cwnd = 4 * tp->t_maxseg; + } if (CC_ALGO(tp)->conn_init != NULL) CC_ALGO(tp)->conn_init(tp->ccv);