Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
Show First 20 Lines • Show All 2,583 Lines • ▼ Show 20 Lines | if (SEQ_LEQ(th->th_ack, tp->snd_una)) { | ||||
*/ | */ | ||||
del_data = tp->sackhint.delivered_data; | del_data = tp->sackhint.delivered_data; | ||||
if (V_tcp_do_rfc6675_pipe) | if (V_tcp_do_rfc6675_pipe) | ||||
pipe = tcp_compute_pipe(tp); | pipe = tcp_compute_pipe(tp); | ||||
else | 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 = | ||||
imax(1, tp->snd_nxt - tp->snd_una); | imax(1, tp->snd_nxt - tp->snd_una); | ||||
snd_cnt = howmany((long)tp->sackhint.prr_delivered * | snd_cnt = howmany((long)tp->sackhint.prr_delivered * | ||||
tp->snd_ssthresh, tp->sackhint.recover_fs) - | tp->snd_ssthresh, tp->sackhint.recover_fs) - | ||||
(tp->sackhint.sack_bytes_rexmit + | (tp->sackhint.sack_bytes_rexmit + | ||||
(tp->snd_nxt - tp->snd_recover)); | (tp->snd_nxt - tp->snd_recover)); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | enter_recovery: | ||||
CC_DUPACK); | CC_DUPACK); | ||||
tcp_timer_activate(tp, TT_REXMT, 0); | tcp_timer_activate(tp, TT_REXMT, 0); | ||||
tp->t_rtttime = 0; | tp->t_rtttime = 0; | ||||
if (V_tcp_do_prr) { | if (V_tcp_do_prr) { | ||||
/* | /* | ||||
* snd_ssthresh is already updated by | * snd_ssthresh is already updated by | ||||
* cc_cong_signal. | * cc_cong_signal. | ||||
*/ | */ | ||||
tp->sackhint.prr_delivered = 0; | tp->sackhint.prr_delivered = | ||||
tp->sackhint.sacked_bytes; | |||||
tp->sackhint.sack_bytes_rexmit = 0; | tp->sackhint.sack_bytes_rexmit = 0; | ||||
tp->sackhint.recover_fs = max(1, | tp->sackhint.recover_fs = max(1, | ||||
tp->snd_nxt - tp->snd_una); | tp->snd_nxt - tp->snd_una); | ||||
} | } | ||||
if (tp->t_flags & TF_SACK_PERMIT) { | if (tp->t_flags & TF_SACK_PERMIT) { | ||||
TCPSTAT_INC( | TCPSTAT_INC( | ||||
tcps_sack_recovery_episode); | tcps_sack_recovery_episode); | ||||
tp->snd_recover = tp->snd_nxt; | tp->snd_recover = tp->snd_nxt; | ||||
▲ Show 20 Lines • Show All 1,258 Lines • ▼ Show 20 Lines | tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) | ||||
if (V_tcp_do_rfc6675_pipe) | if (V_tcp_do_rfc6675_pipe) | ||||
pipe = tcp_compute_pipe(tp); | pipe = tcp_compute_pipe(tp); | ||||
else | 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 = | ||||
imax(1, tp->snd_nxt - tp->snd_una); | imax(1, tp->snd_nxt - tp->snd_una); | ||||
snd_cnt = howmany((long)tp->sackhint.prr_delivered * | snd_cnt = howmany((long)tp->sackhint.prr_delivered * | ||||
tp->snd_ssthresh, tp->sackhint.recover_fs) - | tp->snd_ssthresh, tp->sackhint.recover_fs) - | ||||
(tp->sackhint.sack_bytes_rexmit + | (tp->sackhint.sack_bytes_rexmit + | ||||
(tp->snd_nxt - tp->snd_recover)); | (tp->snd_nxt - tp->snd_recover)); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |