From 4a89983d1dbf3dcf4ba205a721d066f349e1cd1a Mon Sep 17 00:00:00 2001 From: Neal Cardwell Date: Mon, 21 Nov 2011 17:15:14 +0000 Subject: [PATCH] --- yaml --- r: 278267 b: refs/heads/master c: 6b5a5c0dbb11dcff4e1b0f1ef87a723197948ed4 h: refs/heads/master i: 278265: bf898a1b3aba72e7003d33909d1c67bf92075534 278263: 77feafc1aee918b5d9a3d7e91dc2c2d07a8f1b59 v: v3 --- [refs] | 2 +- trunk/include/net/tcp.h | 8 ++++++++ trunk/net/ipv4/tcp_cong.c | 2 +- trunk/net/ipv4/tcp_output.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index d07631a8b560..cba42084794a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: befc93fe76177b3b6ee1e3351b58293866f43aa6 +refs/heads/master: 6b5a5c0dbb11dcff4e1b0f1ef87a723197948ed4 diff --git a/trunk/include/net/tcp.h b/trunk/include/net/tcp.h index 113160b84588..87e3c80bfa00 100644 --- a/trunk/include/net/tcp.h +++ b/trunk/include/net/tcp.h @@ -834,6 +834,14 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk) extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh); extern __u32 tcp_init_cwnd(const struct tcp_sock *tp, const struct dst_entry *dst); +/* The maximum number of MSS of available cwnd for which TSO defers + * sending if not using sysctl_tcp_tso_win_divisor. + */ +static inline __u32 tcp_max_tso_deferred_mss(const struct tcp_sock *tp) +{ + return 3; +} + /* Slow start with delack produces 3 packets of burst, so that * it is safe "de facto". This will be the default - same as * the default reordering threshold - but if reordering increases, diff --git a/trunk/net/ipv4/tcp_cong.c b/trunk/net/ipv4/tcp_cong.c index 850c737e08e2..fc6d475f488f 100644 --- a/trunk/net/ipv4/tcp_cong.c +++ b/trunk/net/ipv4/tcp_cong.c @@ -292,7 +292,7 @@ int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd && left * tp->mss_cache < sk->sk_gso_max_size) return 1; - return left <= tcp_max_burst(tp); + return left <= tcp_max_tso_deferred_mss(tp); } EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited); diff --git a/trunk/net/ipv4/tcp_output.c b/trunk/net/ipv4/tcp_output.c index 63170e297540..58f69acd3d22 100644 --- a/trunk/net/ipv4/tcp_output.c +++ b/trunk/net/ipv4/tcp_output.c @@ -1581,7 +1581,7 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb) * frame, so if we have space for more than 3 frames * then send now. */ - if (limit > tcp_max_burst(tp) * tp->mss_cache) + if (limit > tcp_max_tso_deferred_mss(tp) * tp->mss_cache) goto send_now; }