Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_input.c
Show First 20 Lines • Show All 3,488 Lines • ▼ Show 20 Lines | |||||
tcp_xmit_timer(struct tcpcb *tp, int rtt) | tcp_xmit_timer(struct tcpcb *tp, int rtt) | ||||
{ | { | ||||
int delta; | int delta; | ||||
INP_WLOCK_ASSERT(tp->t_inpcb); | INP_WLOCK_ASSERT(tp->t_inpcb); | ||||
TCPSTAT_INC(tcps_rttupdated); | TCPSTAT_INC(tcps_rttupdated); | ||||
tp->t_rttupdated++; | tp->t_rttupdated++; | ||||
if (tp->t_srtt != 0) { | if ((tp->t_srtt != 0) && (tp->t_rxtshift <= TCP_RTT_INVALIDATE)) { | ||||
lstewart: I realise you're just shuffling around the original logic, but I'm curious if, based on the… | |||||
rstoneAuthorUnsubmitted Not Done Inline ActionsNo, I have no data that justifies this particular value. It's just what we've always done. rstone: No, I have no data that justifies this particular value. It's just what we've always done. | |||||
/* | /* | ||||
* srtt is stored as fixed point with 5 bits after the | * srtt is stored as fixed point with 5 bits after the | ||||
* binary point (i.e., scaled by 8). The following magic | * binary point (i.e., scaled by 8). The following magic | ||||
* is equivalent to the smoothing algorithm in rfc793 with | * is equivalent to the smoothing algorithm in rfc793 with | ||||
* an alpha of .875 (srtt = rtt/8 + srtt*7/8 in fixed | * an alpha of .875 (srtt = rtt/8 + srtt*7/8 in fixed | ||||
* point). Adjust rtt to origin 0. | * point). Adjust rtt to origin 0. | ||||
*/ | */ | ||||
delta = ((rtt - 1) << TCP_DELTA_SHIFT) | delta = ((rtt - 1) << TCP_DELTA_SHIFT) | ||||
▲ Show 20 Lines • Show All 390 Lines • Show Last 20 Lines |
I realise you're just shuffling around the original logic, but I'm curious if, based on the investigation that led you to this nit, you have any data around why updating the smoothed estimate is appropriate when rxtshift <= 3 but not >3?