aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 3355c276b611..a9243cfc1bea 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -69,7 +69,7 @@ static int tcp_out_of_resources(struct sock *sk, int do_reset)
69 struct tcp_sock *tp = tcp_sk(sk); 69 struct tcp_sock *tp = tcp_sk(sk);
70 int orphans = atomic_read(&tcp_orphan_count); 70 int orphans = atomic_read(&tcp_orphan_count);
71 71
72 /* If peer does not open window for long time, or did not transmit 72 /* If peer does not open window for long time, or did not transmit
73 * anything for long time, penalize it. */ 73 * anything for long time, penalize it. */
74 if ((s32)(tcp_time_stamp - tp->lsndtime) > 2*TCP_RTO_MAX || !do_reset) 74 if ((s32)(tcp_time_stamp - tp->lsndtime) > 2*TCP_RTO_MAX || !do_reset)
75 orphans <<= 1; 75 orphans <<= 1;
@@ -137,7 +137,7 @@ static int tcp_write_timeout(struct sock *sk)
137 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); 137 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
138 } else { 138 } else {
139 mss = min(sysctl_tcp_base_mss, 139 mss = min(sysctl_tcp_base_mss,
140 tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low)/2); 140 tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low)/2);
141 mss = max(mss, 68 - tp->tcp_header_len); 141 mss = max(mss, 68 - tp->tcp_header_len);
142 icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss); 142 icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss);
143 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); 143 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
@@ -150,7 +150,7 @@ static int tcp_write_timeout(struct sock *sk)
150 retry_until = sysctl_tcp_retries2; 150 retry_until = sysctl_tcp_retries2;
151 if (sock_flag(sk, SOCK_DEAD)) { 151 if (sock_flag(sk, SOCK_DEAD)) {
152 const int alive = (icsk->icsk_rto < TCP_RTO_MAX); 152 const int alive = (icsk->icsk_rto < TCP_RTO_MAX);
153 153
154 retry_until = tcp_orphan_retries(sk, alive); 154 retry_until = tcp_orphan_retries(sk, alive);
155 155
156 if (tcp_out_of_resources(sk, alive || icsk->icsk_retransmits < retry_until)) 156 if (tcp_out_of_resources(sk, alive || icsk->icsk_retransmits < retry_until))
@@ -257,7 +257,7 @@ static void tcp_probe_timer(struct sock *sk)
257 257
258 if (sock_flag(sk, SOCK_DEAD)) { 258 if (sock_flag(sk, SOCK_DEAD)) {
259 const int alive = ((icsk->icsk_rto << icsk->icsk_backoff) < TCP_RTO_MAX); 259 const int alive = ((icsk->icsk_rto << icsk->icsk_backoff) < TCP_RTO_MAX);
260 260
261 max_probes = tcp_orphan_retries(sk, alive); 261 max_probes = tcp_orphan_retries(sk, alive);
262 262
263 if (tcp_out_of_resources(sk, alive || icsk->icsk_probes_out <= max_probes)) 263 if (tcp_out_of_resources(sk, alive || icsk->icsk_probes_out <= max_probes))
@@ -453,7 +453,7 @@ static void tcp_keepalive_timer (unsigned long data)
453 /* Only process if socket is not in use. */ 453 /* Only process if socket is not in use. */
454 bh_lock_sock(sk); 454 bh_lock_sock(sk);
455 if (sock_owned_by_user(sk)) { 455 if (sock_owned_by_user(sk)) {
456 /* Try again later. */ 456 /* Try again later. */
457 inet_csk_reset_keepalive_timer (sk, HZ/20); 457 inet_csk_reset_keepalive_timer (sk, HZ/20);
458 goto out; 458 goto out;
459 } 459 }
@@ -515,7 +515,7 @@ resched:
515 inet_csk_reset_keepalive_timer (sk, elapsed); 515 inet_csk_reset_keepalive_timer (sk, elapsed);
516 goto out; 516 goto out;
517 517
518death: 518death:
519 tcp_done(sk); 519 tcp_done(sk);
520 520
521out: 521out: