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 6,831 Lines • ▼ Show 20 Lines | #ifdef RSS | ||||
struct inpcb *inp; | struct inpcb *inp; | ||||
rack = (struct tcp_rack *)tp->t_fb_ptr; | rack = (struct tcp_rack *)tp->t_fb_ptr; | ||||
if (rack->r_state == 0) { | if (rack->r_state == 0) { | ||||
/* | /* | ||||
* Initial input (ACK to SYN-ACK etc)lets go ahead and get | * Initial input (ACK to SYN-ACK etc)lets go ahead and get | ||||
* it processed | * it processed | ||||
*/ | */ | ||||
if (ti_locked != TI_RLOCKED && INP_INFO_TRY_RLOCK(&V_tcbinfo)) | INP_INFO_RLOCK(); | ||||
ti_locked = TI_RLOCKED; | ti_locked = TI_RLOCKED; | ||||
if (ti_locked != TI_RLOCKED) { | |||||
inp = tp->t_inpcb; | |||||
tfb = tp->t_fb; | |||||
in_pcbref(inp); | |||||
INP_WUNLOCK(inp); | |||||
INP_INFO_RLOCK(&V_tcbinfo); | |||||
ti_locked = TI_RLOCKED; | |||||
INP_WLOCK(inp); | |||||
if (in_pcbrele_wlocked(inp)) | |||||
inp = NULL; | |||||
if (inp == NULL || (inp->inp_flags2 & INP_FREED) || | |||||
(inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED))) { | |||||
/* The TCPCB went away. Free the packet. */ | |||||
INP_INFO_RUNLOCK(&V_tcbinfo); | |||||
if (inp) | |||||
INP_WUNLOCK(inp); | |||||
m_freem(m); | |||||
return; | |||||
} | |||||
/* If the stack changed, call the correct stack. */ | |||||
if (tp->t_fb != tfb) { | |||||
tp->t_fb->tfb_tcp_do_segment(m, th, so, tp, | |||||
drop_hdrlen, tlen, iptos, ti_locked); | |||||
return; | |||||
} | |||||
} | |||||
tcp_get_usecs(&tv); | tcp_get_usecs(&tv); | ||||
rack_hpts_do_segment(m, th, so, tp, drop_hdrlen, | rack_hpts_do_segment(m, th, so, tp, drop_hdrlen, | ||||
tlen, iptos, ti_locked, 0, &tv); | tlen, iptos, ti_locked, 0, &tv); | ||||
return; | return; | ||||
} | } | ||||
if (ti_locked == TI_RLOCKED) | if (ti_locked == TI_RLOCKED) | ||||
INP_INFO_RUNLOCK(&V_tcbinfo); | INP_INFO_RUNLOCK(&V_tcbinfo); | ||||
tcp_queue_to_input(tp, m, th, tlen, drop_hdrlen, iptos, (uint8_t) ti_locked); | tcp_queue_to_input(tp, m, th, tlen, drop_hdrlen, iptos, (uint8_t) ti_locked); | ||||
▲ Show 20 Lines • Show All 2,339 Lines • Show Last 20 Lines |