Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 2,141 Lines • ▼ Show 20 Lines | #endif /* INET6 */ | ||||
/* | /* | ||||
* The tcpcb will hold a reference on its inpcb until tcp_discardcb() | * The tcpcb will hold a reference on its inpcb until tcp_discardcb() | ||||
* is called. | * is called. | ||||
*/ | */ | ||||
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, NULL) > 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); | 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); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
#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 | ||||
if (V_tcp_do_lrd) | if (V_tcp_do_lrd) | ||||
tp->t_flags |= TF_LRD; | tp->t_flags |= TF_LRD; | ||||
return (tp); /* XXX */ | return (tp); /* XXX */ | ||||
} | } | ||||
extern struct cc_algo newreno_cc_algo; | |||||
/* | /* | ||||
* Switch the congestion control algorithm back to NewReno for any active | * Switch the congestion control algorithm back to NewReno for any active | ||||
* control blocks using an algorithm which is about to go away. | * control blocks using an algorithm which is about to go away. | ||||
* This ensures the CC framework can allow the unload to proceed without leaving | * This ensures the CC framework can allow the unload to proceed without leaving | ||||
* any dangling pointers which would trigger a panic. | * any dangling pointers which would trigger a panic. | ||||
* Returning non-zero would inform the CC framework that something went wrong | * Returning non-zero would inform the CC framework that something went wrong | ||||
* and it would be unsafe to allow the unload to proceed. However, there is no | * and it would be unsafe to allow the unload to proceed. However, there is no | ||||
▲ Show 20 Lines • Show All 1,949 Lines • Show Last 20 Lines |