diff options
-rw-r--r-- | net/ipv4/tcp_timer.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index c36089aa3515..d7399a89469d 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -500,14 +500,13 @@ void tcp_retransmit_timer(struct sock *sk) | |||
500 | 500 | ||
501 | tcp_enter_loss(sk); | 501 | tcp_enter_loss(sk); |
502 | 502 | ||
503 | icsk->icsk_retransmits++; | ||
503 | if (tcp_retransmit_skb(sk, tcp_rtx_queue_head(sk), 1) > 0) { | 504 | if (tcp_retransmit_skb(sk, tcp_rtx_queue_head(sk), 1) > 0) { |
504 | /* Retransmission failed because of local congestion, | 505 | /* Retransmission failed because of local congestion, |
505 | * do not backoff. | 506 | * Let senders fight for local resources conservatively. |
506 | */ | 507 | */ |
507 | if (!icsk->icsk_retransmits) | ||
508 | icsk->icsk_retransmits = 1; | ||
509 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, | 508 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, |
510 | min(icsk->icsk_rto, TCP_RESOURCE_PROBE_INTERVAL), | 509 | TCP_RESOURCE_PROBE_INTERVAL, |
511 | TCP_RTO_MAX); | 510 | TCP_RTO_MAX); |
512 | goto out; | 511 | goto out; |
513 | } | 512 | } |
@@ -528,7 +527,6 @@ void tcp_retransmit_timer(struct sock *sk) | |||
528 | * the 120 second clamps though! | 527 | * the 120 second clamps though! |
529 | */ | 528 | */ |
530 | icsk->icsk_backoff++; | 529 | icsk->icsk_backoff++; |
531 | icsk->icsk_retransmits++; | ||
532 | 530 | ||
533 | out_reset_timer: | 531 | out_reset_timer: |
534 | /* If stream is thin, use linear timeouts. Since 'icsk_backoff' is | 532 | /* If stream is thin, use linear timeouts. Since 'icsk_backoff' is |