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 8,338 Lines • ▼ Show 20 Lines | if ((sbused(&so->so_snd) == 0) && | ||||
/* | /* | ||||
* We must be sure our fin | * We must be sure our fin | ||||
* was sent and acked (we can be | * was sent and acked (we can be | ||||
* in FIN_WAIT_1 without having | * in FIN_WAIT_1 without having | ||||
* sent the fin). | * sent the fin). | ||||
*/ | */ | ||||
ourfinisacked = 1; | ourfinisacked = 1; | ||||
} | } | ||||
SOCKBUF_UNLOCK(&so->so_snd); | /* NB: sowwakeup_locked() does an implicit unlock. */ | ||||
tp->t_flags |= TF_WAKESOW; | sowwakeup_locked(so); | ||||
m_freem(mfree); | m_freem(mfree); | ||||
if (rack->r_ctl.rc_early_recovery == 0) { | if (rack->r_ctl.rc_early_recovery == 0) { | ||||
if (IN_RECOVERY(tp->t_flags)) { | if (IN_RECOVERY(tp->t_flags)) { | ||||
if (SEQ_LT(th->th_ack, tp->snd_recover) && | if (SEQ_LT(th->th_ack, tp->snd_recover) && | ||||
(SEQ_LT(th->th_ack, tp->snd_max))) { | (SEQ_LT(th->th_ack, tp->snd_max))) { | ||||
tcp_rack_partialack(tp, th); | tcp_rack_partialack(tp, th); | ||||
} else { | } else { | ||||
rack_post_recovery(tp, th); | rack_post_recovery(tp, th); | ||||
▲ Show 20 Lines • Show All 782 Lines • ▼ Show 20 Lines | if (tp->snd_una == tp->snd_max) { | ||||
if (rack->r_ctl.rc_went_idle_time == 0) | if (rack->r_ctl.rc_went_idle_time == 0) | ||||
rack->r_ctl.rc_went_idle_time = 1; | rack->r_ctl.rc_went_idle_time = 1; | ||||
rack_log_progress_event(rack, tp, 0, PROGRESS_CLEAR, __LINE__); | rack_log_progress_event(rack, tp, 0, PROGRESS_CLEAR, __LINE__); | ||||
if (sbavail(&tp->t_inpcb->inp_socket->so_snd) == 0) | if (sbavail(&tp->t_inpcb->inp_socket->so_snd) == 0) | ||||
tp->t_acktime = 0; | tp->t_acktime = 0; | ||||
rack_timer_cancel(tp, rack, rack->r_ctl.rc_rcvtime, __LINE__); | rack_timer_cancel(tp, rack, rack->r_ctl.rc_rcvtime, __LINE__); | ||||
} | } | ||||
/* Wake up the socket if we have room to write more */ | /* Wake up the socket if we have room to write more */ | ||||
tp->t_flags |= TF_WAKESOW; | sowwakeup(so); | ||||
if (sbavail(&so->so_snd)) { | if (sbavail(&so->so_snd)) { | ||||
rack->r_wanted_output = 1; | rack->r_wanted_output = 1; | ||||
} | } | ||||
return (1); | return (1); | ||||
} | } | ||||
/* | /* | ||||
* Return value of 1, the TCB is unlocked and most | * Return value of 1, the TCB is unlocked and most | ||||
▲ Show 20 Lines • Show All 5,826 Lines • Show Last 20 Lines |