tcp: fix SNMP TCP timeout under-estimation
authorYuchung Cheng <ycheng@google.com>
Thu, 29 Nov 2018 00:06:45 +0000 (16:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:41:17 +0000 (10:41 +0100)
commit5471717b1134300e4c567edbadf403f81b2a8072
treed124e3f80a4ae4086076523b527a7402ed3462a5
parent4ae7b6e070902ff3caf262bfc6d9ef52d2704ed0
tcp: fix SNMP TCP timeout under-estimation

[ Upstream commit e1561fe2dd69dc5dddd69bd73aa65355bdfb048b ]

Previously the SNMP TCPTIMEOUTS counter has inconsistent accounting:
1. It counts all SYN and SYN-ACK timeouts
2. It counts timeouts in other states except recurring timeouts and
   timeouts after fast recovery or disorder state.

Such selective accounting makes analysis difficult and complicated. For
example the monitoring system needs to collect many other SNMP counters
to infer the total amount of timeout events. This patch makes TCPTIMEOUTS
counter simply counts all the retransmit timeout (SYN or data or FIN).

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp_timer.c