Changeset View
Changeset View
Standalone View
Standalone View
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 12,485 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
/* Make sure snd_nxt is correctly set */ | /* Make sure snd_nxt is correctly set */ | ||||
tp->snd_nxt = tp->snd_max; | tp->snd_nxt = tp->snd_max; | ||||
} | } | ||||
static void | static void | ||||
rack_set_state(struct tcpcb *tp, struct tcp_rack *rack) | rack_set_state(struct tcpcb *tp, struct tcp_rack *rack) | ||||
{ | { | ||||
if ((rack->r_state == TCPS_CLOSED) && (tp->t_state != TCPS_CLOSED)) { | |||||
rack->r_is_v6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0; | |||||
} | |||||
switch (tp->t_state) { | switch (tp->t_state) { | ||||
case TCPS_SYN_SENT: | case TCPS_SYN_SENT: | ||||
rack->r_state = TCPS_SYN_SENT; | rack->r_state = TCPS_SYN_SENT; | ||||
rack->r_substate = rack_do_syn_sent; | rack->r_substate = rack_do_syn_sent; | ||||
break; | break; | ||||
case TCPS_SYN_RECEIVED: | case TCPS_SYN_RECEIVED: | ||||
rack->r_state = TCPS_SYN_RECEIVED; | rack->r_state = TCPS_SYN_RECEIVED; | ||||
rack->r_substate = rack_do_syn_recv; | rack->r_substate = rack_do_syn_recv; | ||||
▲ Show 20 Lines • Show All 3,708 Lines • ▼ Show 20 Lines | if (idle > rack_min_probertt_hold) { | ||||
rack->r_ctl.rc_time_probertt_starts = rack->r_ctl.rc_lower_rtt_us_cts; | rack->r_ctl.rc_time_probertt_starts = rack->r_ctl.rc_lower_rtt_us_cts; | ||||
rack->r_ctl.rc_time_of_last_probertt = rack->r_ctl.rc_lower_rtt_us_cts; | rack->r_ctl.rc_time_of_last_probertt = rack->r_ctl.rc_lower_rtt_us_cts; | ||||
} else { | } else { | ||||
rack_exit_probertt(rack, cts); | rack_exit_probertt(rack, cts); | ||||
} | } | ||||
} | } | ||||
idle = 0; | idle = 0; | ||||
} | } | ||||
if (rack_use_fsb && (rack->r_fsb_inited == 0)) | if (rack_use_fsb && (rack->r_fsb_inited == 0) && (rack->r_state != TCPS_CLOSED)) | ||||
rack_init_fsb_block(tp, rack); | rack_init_fsb_block(tp, rack); | ||||
again: | again: | ||||
/* | /* | ||||
* If we've recently taken a timeout, snd_max will be greater than | * If we've recently taken a timeout, snd_max will be greater than | ||||
* snd_nxt. There may be SACK information that allows us to avoid | * snd_nxt. There may be SACK information that allows us to avoid | ||||
* resending already delivered data. Adjust snd_nxt accordingly. | * resending already delivered data. Adjust snd_nxt accordingly. | ||||
*/ | */ | ||||
sendalot = 0; | sendalot = 0; | ||||
▲ Show 20 Lines • Show All 3,797 Lines • Show Last 20 Lines |