Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225212
b: refs/heads/master
c: 356f039
h: refs/heads/master
v: v3
  • Loading branch information
Nandita Dukkipati authored and David S. Miller committed Dec 21, 2010
1 parent 3355d9a commit e7044b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eda83e3b63e88351310c13c99178eb4634f137b2
refs/heads/master: 356f039822b8d802138f7121c80d2a9286976dbd
3 changes: 3 additions & 0 deletions trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
*/
#define MAX_TCP_WINDOW 32767U

/* Offer an initial receive window of 10 mss. */
#define TCP_DEFAULT_INIT_RCVWND 10

/* Minimal accepted MSS. It is (60+60+8) - (20+20). */
#define TCP_MIN_MSS 88U

Expand Down
11 changes: 8 additions & 3 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,15 @@ void tcp_select_initial_window(int __space, __u32 mss,
}
}

/* Set initial window to value enough for senders, following RFC5681. */
/* Set initial window to a value enough for senders starting with
* initial congestion window of TCP_DEFAULT_INIT_RCVWND. Place
* a limit on the initial window when mss is larger than 1460.
*/
if (mss > (1 << *rcv_wscale)) {
int init_cwnd = rfc3390_bytes_to_packets(mss);

int init_cwnd = TCP_DEFAULT_INIT_RCVWND;
if (mss > 1460)
init_cwnd =
max_t(u32, (1460 * TCP_DEFAULT_INIT_RCVWND) / mss, 2);
/* when initializing use the value from init_rcv_wnd
* rather than the default from above
*/
Expand Down

0 comments on commit e7044b9

Please sign in to comment.