Commit 24ab6bec authored by Yuchung Cheng's avatar Yuchung Cheng Committed by David S. Miller

tcp: account all retransmit failures

Change snmp RETRANSFAILS stat to include timeout retransmit failures
in addition to other loss recoveries.
Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e7638524
...@@ -2407,6 +2407,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) ...@@ -2407,6 +2407,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
* see tcp_input.c tcp_sacktag_write_queue(). * see tcp_input.c tcp_sacktag_write_queue().
*/ */
TCP_SKB_CB(skb)->ack_seq = tp->snd_nxt; TCP_SKB_CB(skb)->ack_seq = tp->snd_nxt;
} else {
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL);
} }
return err; return err;
} }
...@@ -2528,10 +2530,9 @@ void tcp_xmit_retransmit_queue(struct sock *sk) ...@@ -2528,10 +2530,9 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS)) if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS))
continue; continue;
if (tcp_retransmit_skb(sk, skb)) { if (tcp_retransmit_skb(sk, skb))
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL);
return; return;
}
NET_INC_STATS_BH(sock_net(sk), mib_idx); NET_INC_STATS_BH(sock_net(sk), mib_idx);
if (tcp_in_cwnd_reduction(sk)) if (tcp_in_cwnd_reduction(sk))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment