Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_timer.c
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | tcp_slowtimo(void) | ||||
VNET_FOREACH(vnet_iter) { | VNET_FOREACH(vnet_iter) { | ||||
CURVNET_SET(vnet_iter); | CURVNET_SET(vnet_iter); | ||||
(void) tcp_tw_2msl_scan(0); | (void) tcp_tw_2msl_scan(0); | ||||
CURVNET_RESTORE(); | CURVNET_RESTORE(); | ||||
} | } | ||||
VNET_LIST_RUNLOCK_NOSLEEP(); | VNET_LIST_RUNLOCK_NOSLEEP(); | ||||
} | } | ||||
int tcp_syn_backoff[TCP_MAXRXTSHIFT + 1] = | |||||
{ 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 64, 64 }; | |||||
int tcp_backoff[TCP_MAXRXTSHIFT + 1] = | int tcp_backoff[TCP_MAXRXTSHIFT + 1] = | ||||
{ 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, 512, 512 }; | { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, 512, 512 }; | ||||
int tcp_totbackoff = 2559; /* sum of tcp_backoff[] */ | int tcp_totbackoff = 2559; /* sum of tcp_backoff[] */ | ||||
/* | /* | ||||
* TCP timer processing. | * TCP timer processing. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 419 Lines • ▼ Show 20 Lines | if (tp->t_state == TCPS_SYN_SENT) { | ||||
* the retransmitted packet's to_tsval to by tcp_output | * the retransmitted packet's to_tsval to by tcp_output | ||||
*/ | */ | ||||
tp->t_flags |= TF_PREVVALID; | tp->t_flags |= TF_PREVVALID; | ||||
} else | } else | ||||
tp->t_flags &= ~TF_PREVVALID; | tp->t_flags &= ~TF_PREVVALID; | ||||
TCPSTAT_INC(tcps_rexmttimeo); | TCPSTAT_INC(tcps_rexmttimeo); | ||||
if ((tp->t_state == TCPS_SYN_SENT) || | if ((tp->t_state == TCPS_SYN_SENT) || | ||||
(tp->t_state == TCPS_SYN_RECEIVED)) | (tp->t_state == TCPS_SYN_RECEIVED)) | ||||
rexmt = TCPTV_RTOBASE * tcp_syn_backoff[tp->t_rxtshift]; | rexmt = TCPTV_RTOBASE * tcp_backoff[tp->t_rxtshift]; | ||||
else | else | ||||
rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift]; | rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift]; | ||||
TCPT_RANGESET(tp->t_rxtcur, rexmt, | TCPT_RANGESET(tp->t_rxtcur, rexmt, | ||||
tp->t_rttmin, TCPTV_REXMTMAX); | tp->t_rttmin, TCPTV_REXMTMAX); | ||||
/* | /* | ||||
* We enter the path for PLMTUD if connection is established or, if | * We enter the path for PLMTUD if connection is established or, if | ||||
* connection is FIN_WAIT_1 status, reason for the last is that if | * connection is FIN_WAIT_1 status, reason for the last is that if | ||||
▲ Show 20 Lines • Show All 382 Lines • Show Last 20 Lines |