From: Eric Dumazet <eric.dumazet@gmail.com>
To: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: Satoru Moriya <satoru.moriya@hds.com>,
netdev@vger.kernel.org, davem@davemloft.net,
nhorman@tuxdriver.com, tgraf@infradead.org,
Stephen Hemminger <stephen.hemminger@vyatta.com>,
Seiji Aguchi <seiji.aguchi@hds.com>
Subject: Re: [PATCH v2 0/2] Tracepoint for tcp retransmission
Date: Wed, 25 Jan 2012 15:44:20 +0100 [thread overview]
Message-ID: <1327502660.2425.60.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <02e98f84ee62073e1bf92338f6744fde@localhost>
Le mercredi 25 janvier 2012 à 14:27 +0100, Hagen Paul Pfeifer a écrit :
> It is crazy to add everywhere new tracepoints. Systemtap is far from being
> perfect and as smooth as dtrace. But this is an example where systemtap is
> suitable and should be used.
Agreed, but last time I tried systemtap I failed miserably.
It was on a debian distro.
Anyway, it seems we lack a LINUX_MIB_TCPRETRANSFAIL counter.
"netstat -s" is an incredible universal tool.
[PATCH net-next] 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>
---
include/linux/snmp.h | 1 +
net/ipv4/proc.c | 1 +
net/ipv4/tcp_output.c | 4 +++-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/snmp.h b/include/linux/snmp.h
index c1241c42..8ee8af4 100644
--- a/include/linux/snmp.h
+++ b/include/linux/snmp.h
@@ -232,6 +232,7 @@ enum
LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */
LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */
LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */
+ LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */
__LINUX_MIB_MAX
};
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 6afc807..02d6107 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -256,6 +256,7 @@ static const struct snmp_mib snmp4_net_list[] = {
SNMP_MIB_ITEM("TCPTimeWaitOverflow", LINUX_MIB_TCPTIMEWAITOVERFLOW),
SNMP_MIB_ITEM("TCPReqQFullDoCookies", LINUX_MIB_TCPREQQFULLDOCOOKIES),
SNMP_MIB_ITEM("TCPReqQFullDrop", LINUX_MIB_TCPREQQFULLDROP),
+ SNMP_MIB_ITEM("TCPRetransFail", LINUX_MIB_TCPRETRANSFAIL),
SNMP_MIB_SENTINEL
};
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8c8de27..561550a 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2308,8 +2308,10 @@ begin_fwd:
if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS))
continue;
- if (tcp_retransmit_skb(sk, skb))
+ if (tcp_retransmit_skb(sk, skb)) {
+ NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL);
return;
+ }
NET_INC_STATS_BH(sock_net(sk), mib_idx);
if (inet_csk(sk)->icsk_ca_state == TCP_CA_Recovery)
next prev parent reply other threads:[~2012-01-25 14:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 18:07 [PATCH v2 0/2] Tracepoint for tcp retransmission Satoru Moriya
2012-01-20 18:08 ` [PATCH v2 1/2] tcp: refactor tcp_retransmit_skb() for a single return point Satoru Moriya
2012-01-20 18:09 ` [PATCH v2 2/2] tcp: add tracepoint for tcp retransmission Satoru Moriya
2012-01-20 18:50 ` [PATCH v2 0/2] Tracepoint " David Miller
2012-02-03 21:47 ` Satoru Moriya
2012-02-04 4:40 ` Yuchung Cheng
2012-02-06 18:32 ` Satoru Moriya
2012-02-04 14:28 ` Neil Horman
2012-02-04 15:58 ` Hagen Paul Pfeifer
2012-02-04 20:09 ` Neil Horman
2012-02-05 12:53 ` Frank Ch. Eigler
2012-02-05 19:17 ` Neil Horman
2012-02-05 20:04 ` Hagen Paul Pfeifer
2012-02-05 21:48 ` David Miller
2012-02-06 1:32 ` Neil Horman
2012-02-06 15:20 ` Frank Ch. Eigler
2012-02-06 15:24 ` Eric Dumazet
2012-02-06 15:38 ` Neil Horman
2012-02-06 15:53 ` Neil Horman
2012-02-06 16:18 ` Steven Rostedt
2012-02-06 17:02 ` Eric Dumazet
2012-02-06 17:18 ` Steven Rostedt
2012-02-06 16:21 ` Frank Ch. Eigler
2012-02-06 18:21 ` Satoru Moriya
2012-01-25 13:27 ` Hagen Paul Pfeifer
2012-01-25 14:44 ` Eric Dumazet [this message]
2012-01-26 18:51 ` David Miller
2012-02-03 20:31 ` Satoru Moriya
2012-02-03 20:43 ` Satoru Moriya
2012-02-03 20:55 ` Hagen Paul Pfeifer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327502660.2425.60.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=hagen@jauu.net \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=satoru.moriya@hds.com \
--cc=seiji.aguchi@hds.com \
--cc=stephen.hemminger@vyatta.com \
--cc=tgraf@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox