netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: account SYN-ACK timeouts & retransmissions
@ 2010-01-06 20:10 Octavian Purdila
  2010-01-08  1:25 ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Octavian Purdila @ 2010-01-06 20:10 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Octavian Purdila, Maksim Pyatkovskiy

Signed-off-by: Maksim Pyatkovskiy <mpyatkovskiy@ixiacom.com>
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
---
 net/ipv4/inet_connection_sock.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index ee16475..6c20043 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -23,6 +23,7 @@
 #include <net/route.h>
 #include <net/tcp_states.h>
 #include <net/xfrm.h>
+#include <net/tcp.h>
 
 #ifdef INET_CSK_DEBUG
 const char inet_csk_timer_bug_msg[] = "inet_csk BUG: unknown timer value\n";
@@ -525,7 +526,9 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
 		while ((req = *reqp) != NULL) {
 			if (time_after_eq(now, req->expires)) {
 				int expire = 0, resend = 0;
+				struct net *net = sock_net(parent);
 
+				NET_INC_STATS_BH(net, LINUX_MIB_TCPTIMEOUTS);
 				syn_ack_recalc(req, thresh, max_retries,
 					       queue->rskq_defer_accept,
 					       &expire, &resend);
@@ -535,6 +538,7 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
 				     inet_rsk(req)->acked)) {
 					unsigned long timeo;
 
+					TCP_INC_STATS_BH(net, TCP_MIB_RETRANSSEGS);
 					if (req->retrans++ == 0)
 						lopt->qlen_young--;
 					timeo = min((timeout << req->retrans), max_rto);
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-01-18  3:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06 20:10 [PATCH] tcp: account SYN-ACK timeouts & retransmissions Octavian Purdila
2010-01-08  1:25 ` David Miller
2010-01-11 22:16   ` Octavian Purdila
2010-01-12  0:15     ` David Miller
2010-01-12 16:55       ` Octavian Purdila
2010-01-13 21:07         ` Octavian Purdila
2010-01-14 10:03           ` David Miller
2010-01-17 19:27             ` Octavian Purdila
2010-01-18  3:09               ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).