From patchwork Wed Sep 1 05:34:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerrit Renker X-Patchwork-Id: 63349 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2AB5AB715A for ; Wed, 1 Sep 2010 15:35:03 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644Ab0IAFe7 (ORCPT ); Wed, 1 Sep 2010 01:34:59 -0400 Received: from dee.erg.abdn.ac.uk ([139.133.204.82]:56593 "EHLO erg.abdn.ac.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751132Ab0IAFe6 (ORCPT ); Wed, 1 Sep 2010 01:34:58 -0400 Received: from laptev.erg.abdn.ac.uk (Debian-exim@ra-gerrit.erg.abdn.ac.uk [139.133.204.38]) by erg.abdn.ac.uk (8.13.4/8.13.4) with ESMTP id o815Yh1K018321 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 1 Sep 2010 06:34:43 +0100 (BST) Received: from gerrit by laptev.erg.abdn.ac.uk with local (Exim 4.69) (envelope-from ) id 1Oqfy7-0001SF-BF; Wed, 01 Sep 2010 07:34:43 +0200 Date: Wed, 1 Sep 2010 07:34:43 +0200 From: Gerrit Renker To: Ilpo J?rvinen , David Miller , Netdev Subject: net-next-2.6 [PATCH 1/1] tcp: add missing initial window (RFC 3390) for tcp_output Message-ID: <20100901053443.GB5379@gerrit.erg.abdn.ac.uk> Mail-Followup-To: Gerrit Renker , Ilpo J?rvinen , David Miller , Netdev References: <1283145794-5615-1-git-send-email-gerrit@erg.abdn.ac.uk> <1283145794-5615-2-git-send-email-gerrit@erg.abdn.ac.uk> <1283145794-5615-3-git-send-email-gerrit@erg.abdn.ac.uk> <1283145794-5615-4-git-send-email-gerrit@erg.abdn.ac.uk> <20100901052355.GA5379@gerrit.erg.abdn.ac.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100901052355.GA5379@gerrit.erg.abdn.ac.uk> User-Agent: Mutt/1.5.18 (2008-05-17) X-ERG-MailScanner: Found to be clean X-ERG-MailScanner-From: gerrit@erg.abdn.ac.uk X-Spam-Status: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Please can you have a look, I have checked it, appears to be correct and compiles cleanly. Thanks again to Ilpo. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Patch <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< tcp: update also tcp_output with regard to RFC 5681 Thanks to Ilpo Jarvinen, his updates also the initial window setting for tcp_output with regard to RFC 5681. Signed-off-by: Gerrit Renker --- net/ipv4/tcp_output.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -225,15 +225,11 @@ void tcp_select_initial_window(int __spa } /* Set initial window to value enough for senders, - * following RFC2414. Senders, not following this RFC, - * will be satisfied with 2. + * following RFC5681 (which updates RFC3390). */ if (mss > (1 << *rcv_wscale)) { - int init_cwnd = 4; - if (mss > 1460 * 3) - init_cwnd = 2; - else if (mss > 1460) - init_cwnd = 3; + int init_cwnd = rfc3390_bytes_to_packets(mss); + /* when initializing use the value from init_rcv_wnd * rather than the default from above */