Commit 0705c6f0 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

tcp: update also tcp_output with regard to RFC 5681

Thanks to Ilpo Jarvinen, this updates also the initial window
setting for tcp_output with regard to RFC 5681.
Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa50d645
...@@ -224,16 +224,10 @@ void tcp_select_initial_window(int __space, __u32 mss, ...@@ -224,16 +224,10 @@ void tcp_select_initial_window(int __space, __u32 mss,
} }
} }
/* Set initial window to value enough for senders, /* Set initial window to value enough for senders, following RFC5681. */
* following RFC2414. Senders, not following this RFC,
* will be satisfied with 2.
*/
if (mss > (1 << *rcv_wscale)) { if (mss > (1 << *rcv_wscale)) {
int init_cwnd = 4; int init_cwnd = rfc3390_bytes_to_packets(mss);
if (mss > 1460 * 3)
init_cwnd = 2;
else if (mss > 1460)
init_cwnd = 3;
/* when initializing use the value from init_rcv_wnd /* when initializing use the value from init_rcv_wnd
* rather than the default from above * rather than the default from above
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment