Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
Show First 20 Lines • Show All 3,402 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
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++; | if (tp->t_rttupdated < UTYPE_MAX(tp->t_rttupdated)) | ||||
(tp->t_rttupdated)++; | |||||
#ifdef STATS | #ifdef STATS | ||||
stats_voi_update_abs_u32(tp->t_stats, VOI_TCP_RTT, | stats_voi_update_abs_u32(tp->t_stats, VOI_TCP_RTT, | ||||
imax(0, rtt * 1000 / hz)); | imax(0, rtt * 1000 / hz)); | ||||
#endif | #endif | ||||
if ((tp->t_srtt != 0) && (tp->t_rxtshift <= TCP_RTT_INVALIDATE)) { | if ((tp->t_srtt != 0) && (tp->t_rxtshift <= TCP_RTT_INVALIDATE)) { | ||||
/* | /* | ||||
* 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 | ||||
▲ Show 20 Lines • Show All 422 Lines • Show Last 20 Lines |