mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
tcp: convert cached rtt from usec to jiffies when feeding initial rto
Currently it's converted into msecs, thus HZ=1000 intact.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 740b0f1841
("tcp: switch rtt estimations to usec resolution")
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fb5eb24cdd
commit
9bdfb3b79e
@ -550,7 +550,7 @@ reset:
|
|||||||
*/
|
*/
|
||||||
if (crtt > tp->srtt_us) {
|
if (crtt > tp->srtt_us) {
|
||||||
/* Set RTO like tcp_rtt_estimator(), but from cached RTT. */
|
/* Set RTO like tcp_rtt_estimator(), but from cached RTT. */
|
||||||
crtt /= 8 * USEC_PER_MSEC;
|
crtt /= 8 * USEC_PER_SEC / HZ;
|
||||||
inet_csk(sk)->icsk_rto = crtt + max(2 * crtt, tcp_rto_min(sk));
|
inet_csk(sk)->icsk_rto = crtt + max(2 * crtt, tcp_rto_min(sk));
|
||||||
} else if (tp->srtt_us == 0) {
|
} else if (tp->srtt_us == 0) {
|
||||||
/* RFC6298: 5.7 We've failed to get a valid RTT sample from
|
/* RFC6298: 5.7 We've failed to get a valid RTT sample from
|
||||||
|
Loading…
Reference in New Issue
Block a user