Yuchung Cheng 9c30ae8398 tcp: fix TCP socket rehash stats mis-accounting
The previous commit 32efcc06d2a1 ("tcp: export count for rehash attempts")
would mis-account rehashing SNMP and socket stats:

  a. During handshake of an active open, only counts the first
     SYN timeout

  b. After handshake of passive and active open, stop updating
     after (roughly) TCP_RETRIES1 recurring RTOs

  c. After the socket aborts, over count timeout_rehash by 1

This patch fixes this by checking the rehash result from sk_rethink_txhash.

Fixes: 32efcc06d2a1 ("tcp: export count for rehash attempts")
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Link: https://lore.kernel.org/r/20210119192619.1848270-1-ycheng@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-19 19:47:20 -08:00
..
2021-01-14 22:21:53 +01:00
2020-11-24 12:14:56 -08:00
2020-11-03 12:55:53 -08:00
2020-05-05 13:23:29 -07:00
2019-12-09 10:36:44 -08:00
2020-06-22 21:12:44 -07:00
2020-08-31 23:06:51 +02:00
2020-11-10 17:56:54 -08:00
2019-12-09 10:36:44 -08:00
2020-12-15 13:22:29 -08:00
2020-03-04 13:25:55 -08:00
2019-04-22 21:47:25 -07:00
2020-12-15 13:22:29 -08:00
2019-10-05 16:29:00 -07:00
2020-06-18 20:46:23 -07:00
2019-12-09 10:28:43 -08:00