mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
tcp: fix a bug where unshifting should be put last in tcp_get_srtt()
Reported by: Bhaskar Pardeshi from VMware. Reviewers: rscheff, tuexen, #transport! Approved by: tuexen (mentor) Subscribers: imp, melifaro, glebius Differential Revision: https://reviews.freebsd.org/D40267
This commit is contained in:
parent
e4a905d1e0
commit
f5abdb0311
1 changed files with 2 additions and 1 deletions
|
|
@ -4660,8 +4660,9 @@ tcp_get_srtt(struct tcpcb *tp, int granularity)
|
|||
/*
|
||||
* The user wants useconds and internally
|
||||
* its kept in ticks, convert to useconds.
|
||||
* Put unshift at last improves precision.
|
||||
*/
|
||||
srtt = TICKS_2_USEC(srtt);
|
||||
srtt = TICKS_2_USEC(tp->t_srtt) >> TCP_RTT_SHIFT;
|
||||
} else if (granularity == TCP_TMR_GRANULARITY_TICKS) {
|
||||
/*
|
||||
* The user wants ticks and internally its
|
||||
|
|
|
|||
Loading…
Reference in a new issue