netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] tcp: fix under-accounting retransmit SNMP counters
@ 2016-09-21 23:16 Yuchung Cheng
  2016-09-21 23:16 ` [PATCH net] tcp: properly account Fast Open SYN-ACK retrans Yuchung Cheng
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yuchung Cheng @ 2016-09-21 23:16 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, Yuchung Cheng

This patch fixes these under-accounting SNMP rtx stats
LINUX_MIB_TCPFORWARDRETRANS
LINUX_MIB_TCPFASTRETRANS
LINUX_MIB_TCPSLOWSTARTRETRANS
when retransmitting TSO packets

Fixes: 10d3be569243 ("tcp-tso: do not split TSO packets at retransmit time")
Signed-off-by: Yuchung Cheng <ycheng@google.com>
---
 net/ipv4/tcp_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 810be35..5725822 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2822,7 +2822,7 @@ begin_fwd:
 		if (tcp_retransmit_skb(sk, skb, segs))
 			return;
 
-		NET_INC_STATS(sock_net(sk), mib_idx);
+		NET_ADD_STATS(sock_net(sk), mib_idx, tcp_skb_pcount(skb));
 
 		if (tcp_in_cwnd_reduction(sk))
 			tp->prr_out += tcp_skb_pcount(skb);
-- 
2.8.0.rc3.226.g39d4020

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

end of thread, other threads:[~2016-09-22  7:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 23:16 [PATCH net] tcp: fix under-accounting retransmit SNMP counters Yuchung Cheng
2016-09-21 23:16 ` [PATCH net] tcp: properly account Fast Open SYN-ACK retrans Yuchung Cheng
2016-09-22  7:33   ` David Miller
2016-09-22  2:19 ` [PATCH net] tcp: fix under-accounting retransmit SNMP counters Eric Dumazet
2016-09-22  7:33 ` 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).