diff options
-rw-r--r-- | include/net/tcp.h | 8 | ||||
-rw-r--r-- | net/ipv4/tcp_cong.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 113160b84588..87e3c80bfa00 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -834,6 +834,14 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk) | |||
834 | extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh); | 834 | extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh); |
835 | extern __u32 tcp_init_cwnd(const struct tcp_sock *tp, const struct dst_entry *dst); | 835 | extern __u32 tcp_init_cwnd(const struct tcp_sock *tp, const struct dst_entry *dst); |
836 | 836 | ||
837 | /* The maximum number of MSS of available cwnd for which TSO defers | ||
838 | * sending if not using sysctl_tcp_tso_win_divisor. | ||
839 | */ | ||
840 | static inline __u32 tcp_max_tso_deferred_mss(const struct tcp_sock *tp) | ||
841 | { | ||
842 | return 3; | ||
843 | } | ||
844 | |||
837 | /* Slow start with delack produces 3 packets of burst, so that | 845 | /* Slow start with delack produces 3 packets of burst, so that |
838 | * it is safe "de facto". This will be the default - same as | 846 | * it is safe "de facto". This will be the default - same as |
839 | * the default reordering threshold - but if reordering increases, | 847 | * the default reordering threshold - but if reordering increases, |
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 850c737e08e2..fc6d475f488f 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -292,7 +292,7 @@ int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) | |||
292 | left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd && | 292 | left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd && |
293 | left * tp->mss_cache < sk->sk_gso_max_size) | 293 | left * tp->mss_cache < sk->sk_gso_max_size) |
294 | return 1; | 294 | return 1; |
295 | return left <= tcp_max_burst(tp); | 295 | return left <= tcp_max_tso_deferred_mss(tp); |
296 | } | 296 | } |
297 | EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited); | 297 | EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited); |
298 | 298 | ||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 63170e297540..58f69acd3d22 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1581,7 +1581,7 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb) | |||
1581 | * frame, so if we have space for more than 3 frames | 1581 | * frame, so if we have space for more than 3 frames |
1582 | * then send now. | 1582 | * then send now. |
1583 | */ | 1583 | */ |
1584 | if (limit > tcp_max_burst(tp) * tp->mss_cache) | 1584 | if (limit > tcp_max_tso_deferred_mss(tp) * tp->mss_cache) |
1585 | goto send_now; | 1585 | goto send_now; |
1586 | } | 1586 | } |
1587 | 1587 | ||