diff mbox

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
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Gerrit Renker Sept. 1, 2010, 5:34 a.m. UTC
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 <gerrit@erg.abdn.ac.uk>
---
 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

Comments

Alexander Zimmermann Sept. 1, 2010, 7:06 a.m. UTC | #1
Hi Gerrit,

Am 01.09.2010 um 07:34 schrieb Gerrit Renker:

> 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 <gerrit@erg.abdn.ac.uk>
> ---
> net/ipv4/tcp_output.c |   10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
> 
> --- 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).

In IETF sense, RFC5681 doesn't update RFC3390.

Alex


> 	 */
> 	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
> 		 */
> --
> 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

//
// Dipl.-Inform. Alexander Zimmermann
// Department of Computer Science, Informatik 4
// RWTH Aachen University
// Ahornstr. 55, 52056 Aachen, Germany
// phone: (49-241) 80-21422, fax: (49-241) 80-22221
// email: zimmermann@cs.rwth-aachen.de
// web: http://www.umic-mesh.net
//
Gerrit Renker Sept. 1, 2010, 10:16 a.m. UTC | #2
|  > --- 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).
| 
| In IETF sense, RFC5681 doesn't update RFC3390.
| 
RFC 3390 updates RFC 2581, and RFC 5681 replaces RFC 2581.
That was too long to write.

I will remove the comment.
--
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
diff mbox

Patch

--- 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
 		 */