Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
Show First 20 Lines • Show All 3,943 Lines • ▼ Show 20 Lines | if (SEQ_GEQ(th->th_ack, tp->snd_una)) | ||||
del_data = BYTES_THIS_ACK(tp, th); | del_data = BYTES_THIS_ACK(tp, th); | ||||
del_data += tp->sackhint.delivered_data; | del_data += tp->sackhint.delivered_data; | ||||
pipe = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit; | pipe = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit; | ||||
tp->sackhint.prr_delivered += del_data; | tp->sackhint.prr_delivered += del_data; | ||||
/* | /* | ||||
* Proportional Rate Reduction | * Proportional Rate Reduction | ||||
*/ | */ | ||||
if (pipe > tp->snd_ssthresh) | if (pipe > tp->snd_ssthresh) | ||||
snd_cnt = (tp->sackhint.prr_delivered * tp->snd_ssthresh / tp->sackhint.recover_fs) - | snd_cnt = (tp->sackhint.prr_delivered * tp->snd_ssthresh | ||||
tp->sackhint.sack_bytes_rexmit; | / tp->sackhint.recover_fs) - tp->sackhint.sack_bytes_rexmit; | ||||
else { | else { | ||||
if (V_tcp_do_prr_conservative) | if (V_tcp_do_prr_conservative) | ||||
limit = tp->sackhint.prr_delivered - tp->sackhint.sack_bytes_rexmit; | limit = tp->sackhint.prr_delivered - | ||||
tp->sackhint.sack_bytes_rexmit; | |||||
else | else | ||||
if ((tp->sackhint.prr_delivered - tp->sackhint.sack_bytes_rexmit) > del_data) | if ((tp->sackhint.prr_delivered - | ||||
limit = tp->sackhint.prr_delivered - tp->sackhint.sack_bytes_rexmit + maxseg; | tp->sackhint.sack_bytes_rexmit) > del_data) | ||||
limit = tp->sackhint.prr_delivered - | |||||
tp->sackhint.sack_bytes_rexmit + maxseg; | |||||
else | else | ||||
limit = del_data + maxseg; | limit = del_data + maxseg; | ||||
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 | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |