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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user