Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_timer.c
Show First 20 Lines • Show All 607 Lines • ▼ Show 20 Lines | tp = tcp_drop(tp, tp->t_softerror ? | ||||
tp->t_softerror : ETIMEDOUT); | tp->t_softerror : ETIMEDOUT); | ||||
headlocked = 1; | headlocked = 1; | ||||
goto out; | goto out; | ||||
} | } | ||||
INP_INFO_RUNLOCK(&V_tcbinfo); | INP_INFO_RUNLOCK(&V_tcbinfo); | ||||
headlocked = 0; | headlocked = 0; | ||||
if (tp->t_state == TCPS_SYN_SENT) { | if (tp->t_state == TCPS_SYN_SENT) { | ||||
/* | /* | ||||
* If the SYN was retransmitted, indicate CWND to be | * If the SYN was retransmitted in SYN_SENT, or the TFO | ||||
* limited to 1 segment in cc_conn_init(). | * SYN|ACK was retransmitted in SYN_RECEIVE, indicate CWND | ||||
* to be limited to 1 segment in cc_conn_init(). | |||||
pkelsey: This comment change needs to be backed out. Reducing cwnd to 1 segment in the case described… | |||||
*/ | */ | ||||
tp->snd_cwnd = 1; | tp->snd_cwnd = 1; | ||||
} else if (tp->t_rxtshift == 1) { | } else if (tp->t_rxtshift == 1) { | ||||
/* | /* | ||||
* first retransmit; record ssthresh and cwnd so they can | * first retransmit; record ssthresh and cwnd so they can | ||||
* be recovered if this turns out to be a "bad" retransmit. | * be recovered if this turns out to be a "bad" retransmit. | ||||
* A retransmit is considered "bad" if an ACK for this | * A retransmit is considered "bad" if an ACK for this | ||||
* segment is received within RTT/2 interval; the assumption | * segment is received within RTT/2 interval; the assumption | ||||
Show All 12 Lines | if (IN_CONGRECOVERY(tp->t_flags)) | ||||
tp->t_flags |= TF_WASCRECOVERY; | tp->t_flags |= TF_WASCRECOVERY; | ||||
else | else | ||||
tp->t_flags &= ~TF_WASCRECOVERY; | tp->t_flags &= ~TF_WASCRECOVERY; | ||||
tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1)); | tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1)); | ||||
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)) | |||||
Not Done Inline ActionsI believe this is desirable behavior in the other case where we would be in TCPS_SYNC_RECEIVED here, which is simultaneous open. pkelsey: I believe this is desirable behavior in the other case where we would be in TCPS_SYNC_RECEIVED… | |||||
rexmt = TCPTV_RTOBASE * tcp_syn_backoff[tp->t_rxtshift]; | rexmt = TCPTV_RTOBASE * tcp_syn_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 | ||||
▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines |
This comment change needs to be backed out. Reducing cwnd to 1 segment in the case described in the comment change is accomplished by cc_cong_signal(..., CC_RTO) below, and I *think* for TFO SYN|ACK we want to apply the tp->t_rxtshift == 1 logic as in general data is present.