Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183236
b: refs/heads/master
c: 31d1292
h: refs/heads/master
v: v3
  • Loading branch information
laurent chavey authored and David S. Miller committed Dec 23, 2009
1 parent 7184a60 commit 4b44ce2
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 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: 068a2de57ddf4f472e32e7af868613c574ad1d88
refs/heads/master: 31d12926e37291970dd4f6e9940df3897766a81d
2 changes: 2 additions & 0 deletions trunk/include/linux/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ enum {
#define RTAX_FEATURES RTAX_FEATURES
RTAX_RTO_MIN,
#define RTAX_RTO_MIN RTAX_RTO_MIN
RTAX_INITRWND,
#define RTAX_INITRWND RTAX_INITRWND
__RTAX_MAX
};

Expand Down
2 changes: 0 additions & 2 deletions trunk/include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ struct dst_entry {
* (L1_CACHE_SIZE would be too much)
*/
#ifdef CONFIG_64BIT
long __pad_to_align_refcnt[2];
#else
long __pad_to_align_refcnt[1];
#endif
/*
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,8 @@ static inline void tcp_sack_reset(struct tcp_options_received *rx_opt)
/* Determine a window scaling and initial window to offer. */
extern void tcp_select_initial_window(int __space, __u32 mss,
__u32 *rcv_wnd, __u32 *window_clamp,
int wscale_ok, __u8 *rcv_wscale);
int wscale_ok, __u8 *rcv_wscale,
__u32 init_rcv_wnd);

static inline int tcp_win_from_space(int space)
{
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv4/syncookies.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,

tcp_select_initial_window(tcp_full_space(sk), req->mss,
&req->rcv_wnd, &req->window_clamp,
ireq->wscale_ok, &rcv_wscale);
ireq->wscale_ok, &rcv_wscale,
dst_metric(&rt->u.dst, RTAX_INITRWND));

ireq->rcv_wscale = rcv_wscale;

Expand Down
17 changes: 13 additions & 4 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ static inline void tcp_event_ack_sent(struct sock *sk, unsigned int pkts)
*/
void tcp_select_initial_window(int __space, __u32 mss,
__u32 *rcv_wnd, __u32 *window_clamp,
int wscale_ok, __u8 *rcv_wscale)
int wscale_ok, __u8 *rcv_wscale,
__u32 init_rcv_wnd)
{
unsigned int space = (__space < 0 ? 0 : __space);

Expand Down Expand Up @@ -232,7 +233,13 @@ void tcp_select_initial_window(int __space, __u32 mss,
init_cwnd = 2;
else if (mss > 1460)
init_cwnd = 3;
if (*rcv_wnd > init_cwnd * mss)
/* when initializing use the value from init_rcv_wnd
* rather than the default from above
*/
if (init_rcv_wnd &&
(*rcv_wnd > init_rcv_wnd * mss))
*rcv_wnd = init_rcv_wnd * mss;
else if (*rcv_wnd > init_cwnd * mss)
*rcv_wnd = init_cwnd * mss;
}

Expand Down Expand Up @@ -2417,7 +2424,8 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
&req->rcv_wnd,
&req->window_clamp,
ireq->wscale_ok,
&rcv_wscale);
&rcv_wscale,
dst_metric(dst, RTAX_INITRWND));
ireq->rcv_wscale = rcv_wscale;
}

Expand Down Expand Up @@ -2544,7 +2552,8 @@ static void tcp_connect_init(struct sock *sk)
&tp->rcv_wnd,
&tp->window_clamp,
sysctl_tcp_window_scaling,
&rcv_wscale);
&rcv_wscale,
dst_metric(dst, RTAX_INITRWND));

tp->rx_opt.rcv_wscale = rcv_wscale;
tp->rcv_ssthresh = tp->rcv_wnd;
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv6/syncookies.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
req->window_clamp = tp->window_clamp ? :dst_metric(dst, RTAX_WINDOW);
tcp_select_initial_window(tcp_full_space(sk), req->mss,
&req->rcv_wnd, &req->window_clamp,
ireq->wscale_ok, &rcv_wscale);
ireq->wscale_ok, &rcv_wscale,
dst_metric(dst, RTAX_INITRWND));

ireq->rcv_wscale = rcv_wscale;

Expand Down

0 comments on commit 4b44ce2

Please sign in to comment.