aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index de02fb4b1349..2250f891f931 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -396,6 +396,9 @@ void tcp_init_sock(struct sock *sk)
396 */ 396 */
397 tp->snd_cwnd = TCP_INIT_CWND; 397 tp->snd_cwnd = TCP_INIT_CWND;
398 398
399 /* There's a bubble in the pipe until at least the first ACK. */
400 tp->app_limited = ~0U;
401
399 /* See draft-stevens-tcpca-spec-01 for discussion of the 402 /* See draft-stevens-tcpca-spec-01 for discussion of the
400 * initialization of these values. 403 * initialization of these values.
401 */ 404 */
@@ -1014,6 +1017,9 @@ int tcp_sendpage(struct sock *sk, struct page *page, int offset,
1014 flags); 1017 flags);
1015 1018
1016 lock_sock(sk); 1019 lock_sock(sk);
1020
1021 tcp_rate_check_app_limited(sk); /* is sending application-limited? */
1022
1017 res = do_tcp_sendpages(sk, page, offset, size, flags); 1023 res = do_tcp_sendpages(sk, page, offset, size, flags);
1018 release_sock(sk); 1024 release_sock(sk);
1019 return res; 1025 return res;
@@ -1115,6 +1121,8 @@ int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
1115 1121
1116 timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); 1122 timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
1117 1123
1124 tcp_rate_check_app_limited(sk); /* is sending application-limited? */
1125
1118 /* Wait for a connection to finish. One exception is TCP Fast Open 1126 /* Wait for a connection to finish. One exception is TCP Fast Open
1119 * (passive side) where data is allowed to be sent before a connection 1127 * (passive side) where data is allowed to be sent before a connection
1120 * is fully established. 1128 * is fully established.