diff options
author | Yuchung Cheng <ycheng@google.com> | 2013-07-12 14:33:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-12 19:15:56 -0400 |
commit | 24ab6bec80861d0c55263047e8bf97e460a32e7b (patch) | |
tree | 251608b48a332a1cc7b0fa0c72fd2e4679dcaf01 /net | |
parent | e76385240ee5c812267319c9084e5a0d62bfbf90 (diff) |
tcp: account all retransmit failures
Change snmp RETRANSFAILS stat to include timeout retransmit failures
in addition to other loss recoveries.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 3d609490f118..92fde8d1aa82 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2407,6 +2407,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
2407 | * see tcp_input.c tcp_sacktag_write_queue(). | 2407 | * see tcp_input.c tcp_sacktag_write_queue(). |
2408 | */ | 2408 | */ |
2409 | TCP_SKB_CB(skb)->ack_seq = tp->snd_nxt; | 2409 | TCP_SKB_CB(skb)->ack_seq = tp->snd_nxt; |
2410 | } else { | ||
2411 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL); | ||
2410 | } | 2412 | } |
2411 | return err; | 2413 | return err; |
2412 | } | 2414 | } |
@@ -2528,10 +2530,9 @@ begin_fwd: | |||
2528 | if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS)) | 2530 | if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS)) |
2529 | continue; | 2531 | continue; |
2530 | 2532 | ||
2531 | if (tcp_retransmit_skb(sk, skb)) { | 2533 | if (tcp_retransmit_skb(sk, skb)) |
2532 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL); | ||
2533 | return; | 2534 | return; |
2534 | } | 2535 | |
2535 | NET_INC_STATS_BH(sock_net(sk), mib_idx); | 2536 | NET_INC_STATS_BH(sock_net(sk), mib_idx); |
2536 | 2537 | ||
2537 | if (tcp_in_cwnd_reduction(sk)) | 2538 | if (tcp_in_cwnd_reduction(sk)) |