diff options
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 25efdae4368a..f87dbc78b6bc 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -484,11 +484,12 @@ void tcp_retransmit_timer(struct sock *sk) | |||
484 | goto out_reset_timer; | 484 | goto out_reset_timer; |
485 | } | 485 | } |
486 | 486 | ||
487 | __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPTIMEOUTS); | ||
487 | if (tcp_write_timeout(sk)) | 488 | if (tcp_write_timeout(sk)) |
488 | goto out; | 489 | goto out; |
489 | 490 | ||
490 | if (icsk->icsk_retransmits == 0) { | 491 | if (icsk->icsk_retransmits == 0) { |
491 | int mib_idx; | 492 | int mib_idx = 0; |
492 | 493 | ||
493 | if (icsk->icsk_ca_state == TCP_CA_Recovery) { | 494 | if (icsk->icsk_ca_state == TCP_CA_Recovery) { |
494 | if (tcp_is_sack(tp)) | 495 | if (tcp_is_sack(tp)) |
@@ -503,10 +504,9 @@ void tcp_retransmit_timer(struct sock *sk) | |||
503 | mib_idx = LINUX_MIB_TCPSACKFAILURES; | 504 | mib_idx = LINUX_MIB_TCPSACKFAILURES; |
504 | else | 505 | else |
505 | mib_idx = LINUX_MIB_TCPRENOFAILURES; | 506 | mib_idx = LINUX_MIB_TCPRENOFAILURES; |
506 | } else { | ||
507 | mib_idx = LINUX_MIB_TCPTIMEOUTS; | ||
508 | } | 507 | } |
509 | __NET_INC_STATS(sock_net(sk), mib_idx); | 508 | if (mib_idx) |
509 | __NET_INC_STATS(sock_net(sk), mib_idx); | ||
510 | } | 510 | } |
511 | 511 | ||
512 | tcp_enter_loss(sk); | 512 | tcp_enter_loss(sk); |