Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 1,707 Lines • ▼ Show 20 Lines | #endif /* INET6 */ | ||||
*/ | */ | ||||
in_pcbref(inp); /* Reference for tcpcb */ | in_pcbref(inp); /* Reference for tcpcb */ | ||||
tp->t_inpcb = inp; | tp->t_inpcb = inp; | ||||
if (CC_ALGO(tp)->cb_init != NULL) | if (CC_ALGO(tp)->cb_init != NULL) | ||||
if (CC_ALGO(tp)->cb_init(tp->ccv) > 0) { | if (CC_ALGO(tp)->cb_init(tp->ccv) > 0) { | ||||
if (tp->t_fb->tfb_tcp_fb_fini) | if (tp->t_fb->tfb_tcp_fb_fini) | ||||
(*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); | (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); | ||||
in_pcbrele_wlocked(inp); | |||||
refcount_release(&tp->t_fb->tfb_refcnt); | refcount_release(&tp->t_fb->tfb_refcnt); | ||||
uma_zfree(V_tcpcb_zone, tm); | uma_zfree(V_tcpcb_zone, tm); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
#ifdef TCP_HHOOK | #ifdef TCP_HHOOK | ||||
tp->osd = &tm->osd; | tp->osd = &tm->osd; | ||||
if (khelp_init_osd(HELPER_CLASS_TCP, tp->osd)) { | if (khelp_init_osd(HELPER_CLASS_TCP, tp->osd)) { | ||||
if (tp->t_fb->tfb_tcp_fb_fini) | if (tp->t_fb->tfb_tcp_fb_fini) | ||||
(*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); | (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); | ||||
in_pcbrele_wlocked(inp); | |||||
refcount_release(&tp->t_fb->tfb_refcnt); | refcount_release(&tp->t_fb->tfb_refcnt); | ||||
uma_zfree(V_tcpcb_zone, tm); | uma_zfree(V_tcpcb_zone, tm); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
#endif | #endif | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
tp->t_vnet = inp->inp_vnet; | tp->t_vnet = inp->inp_vnet; | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | #ifdef TCPPCAP | ||||
*/ | */ | ||||
tcp_pcap_tcpcb_init(tp); | tcp_pcap_tcpcb_init(tp); | ||||
#endif | #endif | ||||
#ifdef TCP_BLACKBOX | #ifdef TCP_BLACKBOX | ||||
/* Initialize the per-TCPCB log data. */ | /* Initialize the per-TCPCB log data. */ | ||||
tcp_log_tcpcbinit(tp); | tcp_log_tcpcbinit(tp); | ||||
#endif | #endif | ||||
if (tp->t_fb->tfb_tcp_fb_init) { | if (tp->t_fb->tfb_tcp_fb_init) { | ||||
(*tp->t_fb->tfb_tcp_fb_init)(tp); | if ((*tp->t_fb->tfb_tcp_fb_init)(tp)) { | ||||
refcount_release(&tp->t_fb->tfb_refcnt); | |||||
in_pcbrele_wlocked(inp); | |||||
uma_zfree(V_tcpcb_zone, tm); | |||||
return (NULL); | |||||
} | |||||
} | } | ||||
#ifdef STATS | #ifdef STATS | ||||
if (V_tcp_perconn_stats_enable == 1) | if (V_tcp_perconn_stats_enable == 1) | ||||
tp->t_stats = stats_blob_alloc(V_tcp_perconn_stats_dflt_tpl, 0); | tp->t_stats = stats_blob_alloc(V_tcp_perconn_stats_dflt_tpl, 0); | ||||
#endif | #endif | ||||
return (tp); /* XXX */ | return (tp); /* XXX */ | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,700 Lines • Show Last 20 Lines |