Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
Show First 20 Lines • Show All 3,984 Lines • ▼ Show 20 Lines | if (pipe > tp->snd_ssthresh) { | ||||
snd_cnt = min((tp->snd_ssthresh - pipe), limit); | snd_cnt = min((tp->snd_ssthresh - pipe), limit); | ||||
} | } | ||||
snd_cnt = max((snd_cnt / maxseg), 0); | snd_cnt = max((snd_cnt / maxseg), 0); | ||||
/* | /* | ||||
* Send snd_cnt new data into the network in response to this ack. | * Send snd_cnt new data into the network in response to this ack. | ||||
* If there is going to be a SACK retransmission, adjust snd_cwnd | * If there is going to be a SACK retransmission, adjust snd_cwnd | ||||
* accordingly. | * accordingly. | ||||
*/ | */ | ||||
tp->snd_cwnd = tp->snd_nxt - tp->snd_recover + | tp->snd_cwnd = max(maxseg, (int64_t)tp->snd_nxt - tp->snd_recover + | ||||
tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg); | tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg)); | ||||
tp->t_flags |= TF_ACKNOW; | tp->t_flags |= TF_ACKNOW; | ||||
(void) tcp_output(tp); | (void) tcp_output(tp); | ||||
} | } | ||||
/* | /* | ||||
* On a partial ack arrives, force the retransmission of the | * On a partial ack arrives, force the retransmission of the | ||||
* next unacknowledged segment. Do not clear tp->t_dupacks. | * next unacknowledged segment. Do not clear tp->t_dupacks. | ||||
* By setting snd_nxt to ti_ack, this forces retransmission timer to | * By setting snd_nxt to ti_ack, this forces retransmission timer to | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |