aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-01-24 23:44:20 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-26 13:51:00 -0500
commit09e9b813d34d9a09d64a64580a9959d8bae1f4f5 (patch)
tree5e8616336466d89c10da8a52166213d345cbe060 /net/ipv4
parentbb349bb4b19b39830e0486aedfd7c7dca23b7baf (diff)
tcp: add LINUX_MIB_TCPRETRANSFAIL counter
It might be useful to get a counter of failed tcp_retransmit_skb() calls. Reported-by: Satoru Moriya <satoru.moriya@hds.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/proc.c1
-rw-r--r--net/ipv4/tcp_output.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 6afc807ee2ad..02d61079f08b 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -256,6 +256,7 @@ static const struct snmp_mib snmp4_net_list[] = {
256 SNMP_MIB_ITEM("TCPTimeWaitOverflow", LINUX_MIB_TCPTIMEWAITOVERFLOW), 256 SNMP_MIB_ITEM("TCPTimeWaitOverflow", LINUX_MIB_TCPTIMEWAITOVERFLOW),
257 SNMP_MIB_ITEM("TCPReqQFullDoCookies", LINUX_MIB_TCPREQQFULLDOCOOKIES), 257 SNMP_MIB_ITEM("TCPReqQFullDoCookies", LINUX_MIB_TCPREQQFULLDOCOOKIES),
258 SNMP_MIB_ITEM("TCPReqQFullDrop", LINUX_MIB_TCPREQQFULLDROP), 258 SNMP_MIB_ITEM("TCPReqQFullDrop", LINUX_MIB_TCPREQQFULLDROP),
259 SNMP_MIB_ITEM("TCPRetransFail", LINUX_MIB_TCPRETRANSFAIL),
259 SNMP_MIB_SENTINEL 260 SNMP_MIB_SENTINEL
260}; 261};
261 262
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8c8de2780c7a..561550ab3c30 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2308,8 +2308,10 @@ begin_fwd:
2308 if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS)) 2308 if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS))
2309 continue; 2309 continue;
2310 2310
2311 if (tcp_retransmit_skb(sk, skb)) 2311 if (tcp_retransmit_skb(sk, skb)) {
2312 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL);
2312 return; 2313 return;
2314 }
2313 NET_INC_STATS_BH(sock_net(sk), mib_idx); 2315 NET_INC_STATS_BH(sock_net(sk), mib_idx);
2314 2316
2315 if (inet_csk(sk)->icsk_ca_state == TCP_CA_Recovery) 2317 if (inet_csk(sk)->icsk_ca_state == TCP_CA_Recovery)