Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
Show First 20 Lines • Show All 2,573 Lines • ▼ Show 20 Lines | if (SEQ_LEQ(th->th_ack, tp->snd_una)) { | ||||
long del_data = 0, pipe = 0; | long del_data = 0, pipe = 0; | ||||
/* | /* | ||||
* In a duplicate ACK del_data is only the | * In a duplicate ACK del_data is only the | ||||
* diff_in_sack. If no SACK is used del_data | * diff_in_sack. If no SACK is used del_data | ||||
* will be 0. Pipe is the amount of data we | * will be 0. Pipe is the amount of data we | ||||
* estimate to be in the network. | * estimate to be in the network. | ||||
*/ | */ | ||||
del_data = tp->sackhint.delivered_data; | del_data = tp->sackhint.delivered_data; | ||||
if (V_tcp_do_rfc6675_pipe) | |||||
pipe = tcp_compute_pipe(tp); | |||||
else | |||||
pipe = (tp->snd_nxt - tp->snd_fack) + | pipe = (tp->snd_nxt - tp->snd_fack) + | ||||
tp->sackhint.sack_bytes_rexmit; | tp->sackhint.sack_bytes_rexmit; | ||||
tp->sackhint.prr_delivered += del_data; | tp->sackhint.prr_delivered += del_data; | ||||
if (pipe > tp->snd_ssthresh) { | if (pipe > tp->snd_ssthresh) { | ||||
if (tp->sackhint.recover_fs == 0) | if (tp->sackhint.recover_fs == 0) | ||||
tp->sackhint.recover_fs = | tp->sackhint.recover_fs = | ||||
max(1, tp->snd_nxt - tp->snd_una); | max(1, tp->snd_nxt - tp->snd_una); | ||||
snd_cnt = (tp->sackhint.prr_delivered * | snd_cnt = (tp->sackhint.prr_delivered * | ||||
tp->snd_ssthresh / | tp->snd_ssthresh / | ||||
tp->sackhint.recover_fs) + | tp->sackhint.recover_fs) + | ||||
▲ Show 20 Lines • Show All 1,363 Lines • ▼ Show 20 Lines | tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) | ||||
/* | /* | ||||
* Compute the amount of data that this ACK is indicating | * Compute the amount of data that this ACK is indicating | ||||
* (del_data) and an estimate of how many bytes are in the | * (del_data) and an estimate of how many bytes are in the | ||||
* network. | * network. | ||||
*/ | */ | ||||
if (SEQ_GEQ(th->th_ack, tp->snd_una)) | 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; | ||||
if (V_tcp_do_rfc6675_pipe) | |||||
pipe = tcp_compute_pipe(tp); | |||||
else | |||||
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) { | ||||
if (tp->sackhint.recover_fs == 0) | if (tp->sackhint.recover_fs == 0) | ||||
tp->sackhint.recover_fs = | tp->sackhint.recover_fs = | ||||
max(1, tp->snd_nxt - tp->snd_una); | max(1, tp->snd_nxt - tp->snd_una); | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |