From owner-freebsd-transport@freebsd.org Fri Jan 29 21:58:51 2016 Return-Path: Delivered-To: freebsd-transport@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 83DDBA73D1D for ; Fri, 29 Jan 2016 21:58:51 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6A00712B0 for ; Fri, 29 Jan 2016 21:58:51 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: by mailman.ysv.freebsd.org (Postfix) id 659A2A73D1C; Fri, 29 Jan 2016 21:58:51 +0000 (UTC) Delivered-To: transport@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 4B382A73D1B for ; Fri, 29 Jan 2016 21:58:51 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.strugglingcoder.info", Issuer "mail.strugglingcoder.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3089412AF for ; Fri, 29 Jan 2016 21:58:50 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 3844BB918; Fri, 29 Jan 2016 13:58:50 -0800 (PST) Date: Fri, 29 Jan 2016 13:58:50 -0800 From: hiren panchasara To: Yongmin Cho Cc: transport@freebsd.org Subject: Re: Restarting Idle Connections Message-ID: <20160129215850.GK33155@strugglingcoder.info> References: <20160129043817.GA9865@yongmincho-All-Series> <20160129215121.GJ33155@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wRokNccIwvMzawGl" Content-Disposition: inline In-Reply-To: <20160129215121.GJ33155@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-transport@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions of transport level network protocols in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2016 21:58:51 -0000 --wRokNccIwvMzawGl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 01/29/16 at 01:51P, hiren panchasara wrote: > On 01/29/16 at 01:38P, Yongmin Cho wrote: > > Hi, all. > >=20 > > I have an opinion about net.inet.tcp.initcwnd_segments. > > You know, snd_cwnd is restarted transmission after a long idle > > period(Current RTO). > > And, All of congestion control algorithm is using newreno_after_idle > > function after a long idle period. > > But, The newreno_after_idle function is not using initcwnd_segments. > > I think, The initcwnd_segments should be used in newreno_after_idle > > function, If the newreno_after_idle is called. > > I referred to rfc6928. > >=20 > > Please check my opinion. >=20 > You are absolutely right. We (FreeBSD) adopted initcwnd to be 10 > segments but never bothered to update newreno_after_idle() function to > reflect that in calculating cwnd after idle period. Though the comments > in that function clearly says: > "The restart window is the initial window or the last CWND, whichever is > smaller." >=20 > I think we should make following change to accommodate it: >=20 > diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c > index 97ec35f..5210a45 100644 > --- a/sys/netinet/cc/cc_newreno.c > +++ b/sys/netinet/cc/cc_newreno.c > @@ -166,6 +166,10 @@ newreno_after_idle(struct cc_var *ccv) > * > * See RFC5681 Section 4.1. "Restarting Idle Connections". > */ > + if (V_tcp_initcwnd_segments) > + rw =3D min(V_tcp_initcwnd_segments * CCV(ccv, t_maxseg), > + max(2 * CCV(ccv, t_maxseg), > + V_tcp_initcwnd_segments * 1460)); - if (V_tcp_do_rfc3390) + else if (V_tcp_do_rfc3390)=20 But you get the idea. :-) Cheers, Hiren > rw =3D min(4 * CCV(ccv, t_maxseg), > max(2 * CCV(ccv, t_maxseg), 4380)); >=20 > Any inputs? >=20 > Cheers, > Hiren > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 >=20 > iQF8BAABCgBmBQJWq97WXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 > QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lf38H/2mwyoYYc0ag1MVE1uzhZ0rL > K2KTnjZnXFuAw6FLgmUtgNw1ykWD2IjhTmNmzTw03KPmQuKj+FyZUHg78hu4kA/l > CbaiIO+1EHw9+aT+2yzZgK5yZLdTIF873sBoCdPWUP826WLjhPuxVox0CPOWzhw1 > XuoSOLYZjsTGysdoMA3AyLOB+ESEC4V1Blf5SocdJPDF0y1Cpes3E6HuXxfix3ee > kj9bKCZL9jU8DAGZHdT9WwF8qfxqRjzhlOUtzY+3pBxglzXPzlhaxS0mGX/W23Jr > MHS9NleAh6M0Ot5M8X8WlXxvwqQdfssKAB3m9JIoTxldbqPRjKOhKALcoG8pqHo=3D > =3DTCcb > -----END PGP SIGNATURE----- --wRokNccIwvMzawGl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJWq+CaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lRREH/18ytIKn9KLieBe7i/G2dLkX ROCsl1Ed6WPhmaIL3HmuD6mjIWttQODEtJmVfaeGwr+pM0vNTeJNoiRBQvyrEdQH 0VupIQQP2pLfuATIkh+vDvzYPkHwSQWxRbKa3lUG5JaXEPnKD+yFyAUhLg9G/E7L yf2WjByMK0mdE/Lhuycg4vYrBimQboewiUwHVvrwaI68WGylbuG5P2xLqSl4fzly Mrf66SyNy+rmYKBGAIajGAnT6I1bchJnzJ+IP6s0CMT8OrY/7ck1owPcGNvU+NUc YGas/ni3QTNtA1Xchtql8WA5GM8n6qYmxukTWwKHbywwTRXVueJ6qxppgzKK2K4= =64N6 -----END PGP SIGNATURE----- --wRokNccIwvMzawGl--