Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_stacks/rack.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 1,784 Lines • ▼ Show 20 Lines | if (todrop > 0) { | ||||
} | } | ||||
if (tp->t_flags & TF_SACK_PERMIT) { | if (tp->t_flags & TF_SACK_PERMIT) { | ||||
/* | /* | ||||
* record the left, to-be-dropped edge of data | * record the left, to-be-dropped edge of data | ||||
* here, for use as dsack block further down | * here, for use as dsack block further down | ||||
*/ | */ | ||||
tcp_update_sack_list(tp, th->th_seq, | tcp_update_sack_list(tp, th->th_seq, | ||||
th->th_seq + todrop); | th->th_seq + todrop); | ||||
/* | |||||
* ACK now, as the next in-sequence segment | |||||
* will clear the DSACK block again | |||||
*/ | |||||
tp->t_flags |= TF_ACKNOW; | |||||
} | } | ||||
*drop_hdrlen += todrop; /* drop from the top afterwards */ | *drop_hdrlen += todrop; /* drop from the top afterwards */ | ||||
th->th_seq += todrop; | th->th_seq += todrop; | ||||
tlen -= todrop; | tlen -= todrop; | ||||
if (th->th_urp > todrop) | if (th->th_urp > todrop) | ||||
th->th_urp -= todrop; | th->th_urp -= todrop; | ||||
else { | else { | ||||
thflags &= ~TH_URG; | thflags &= ~TH_URG; | ||||
▲ Show 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | if ((tp->snd_wnd == 0) && TCPS_HAVEESTABLISHED(tp->t_state)) { | ||||
* passed in with the sbavail(sb) only from bbr_output) and | * passed in with the sbavail(sb) only from bbr_output) and | ||||
* we are established, then we must enter persits (if not | * we are established, then we must enter persits (if not | ||||
* already in persits). | * already in persits). | ||||
*/ | */ | ||||
rack_enter_persist(tp, rack, cts); | rack_enter_persist(tp, rack, cts); | ||||
} | } | ||||
hpts_timeout = rack_timer_start(tp, rack, cts); | hpts_timeout = rack_timer_start(tp, rack, cts); | ||||
if (tp->t_flags & TF_DELACK) { | if (tp->t_flags & TF_DELACK) { | ||||
delayed_ack = tcp_delacktime; | delayed_ack = TICKS_2_MSEC(tcp_delacktime); | ||||
rack->r_ctl.rc_hpts_flags |= PACE_TMR_DELACK; | rack->r_ctl.rc_hpts_flags |= PACE_TMR_DELACK; | ||||
} | } | ||||
if (delayed_ack && ((hpts_timeout == 0) || | if (delayed_ack && ((hpts_timeout == 0) || | ||||
(delayed_ack < hpts_timeout))) | (delayed_ack < hpts_timeout))) | ||||
hpts_timeout = delayed_ack; | hpts_timeout = delayed_ack; | ||||
else | else | ||||
rack->r_ctl.rc_hpts_flags &= ~PACE_TMR_DELACK; | rack->r_ctl.rc_hpts_flags &= ~PACE_TMR_DELACK; | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 6,891 Lines • Show Last 20 Lines |