]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix reordering SNMP under-counting
authorYuchung Cheng <ycheng@google.com>
Tue, 4 Apr 2017 21:15:40 +0000 (14:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 01:41:27 +0000 (18:41 -0700)
commit4afd0d32d6bd661f31e087a9874b497dd2e4d30a
tree50f26c23c14c62b33bd884da0a6715f310b3c90c
parent5735bdd001b7143bd2b17ae6314542cafd6466df
tcp: fix reordering SNMP under-counting

Currently the reordering SNMP counters only increase if a connection
sees a higher degree then it has previously seen. It ignores if the
reordering degree is not greater than the default system threshold.
This significantly under-counts the number of reordering events
and falsely convey that reordering is rare on the network.

This patch properly and faithfully records the number of reordering
events detected by the TCP stack, just like the comment says "this
exciting event is worth to be remembered". Note that even so TCP
still under-estimate the actual reordering events because TCP
requires TS options or certain packet sequences to detect reordering
(i.e. ACKing never-retransmitted sequence in recovery or disordered
 state).

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: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c