]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Add tcp_clamp_rto_to_user_timeout() helper to improve accuracy
authorJon Maxwell <jmaxwell37@gmail.com>
Thu, 19 Jul 2018 01:14:44 +0000 (11:14 +1000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Jul 2018 17:28:55 +0000 (10:28 -0700)
commitdfdd79d8341c4a5a74f88e1b4e5bc10c696e23b4
treeb5ec36b84c8ca0ed31442df0c3c8e456709fb570
parent98fd03a89ecdf042c5477e7c226bf0470ca11c6e
tcp: Add tcp_clamp_rto_to_user_timeout() helper to improve accuracy

Create the tcp_clamp_rto_to_user_timeout() helper routine. To calculate
the correct rto, so that the TCP_USER_TIMEOUT socket option is more
accurate. Taking suggestions and feedback into account from
Eric Dumazet, Neal Cardwell and David Laight. Due to the 1st commit we
can avoid the msecs_to_jiffies() and jiffies_to_msecs() dance.

Signed-off-by: Jon Maxwell <jmaxwell37@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_timer.c