diff options
Diffstat (limited to 'usr/src/uts/common/inet/tcp/tcp.c')
| -rw-r--r-- | usr/src/uts/common/inet/tcp/tcp.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp.c b/usr/src/uts/common/inet/tcp/tcp.c index 73d5505407..7ebd55b572 100644 --- a/usr/src/uts/common/inet/tcp/tcp.c +++ b/usr/src/uts/common/inet/tcp/tcp.c @@ -250,7 +250,10 @@ uint_t tcp_free_list_max_cnt = 0; ((uint_t)(accid) & (TCP_ACCEPTOR_FANOUT_SIZE - 1)) #endif /* _ILP32 */ -/* Minimum number of connections per listener. */ +/* + * Minimum number of connections which can be created per listener. Used + * when the listener connection count is in effect. + */ static uint32_t tcp_min_conn_listener = 2; uint32_t tcp_early_abort = 30; @@ -400,8 +403,6 @@ struct T_info_ack tcp_g_t_info_ack_v6 = { extern mod_prop_info_t tcp_propinfo_tbl[]; extern int tcp_propinfo_count; -#define MB (1024 * 1024) - #define IS_VMLOANED_MBLK(mp) \ (((mp)->b_datap->db_struioflag & STRUIO_ZC) != 0) @@ -853,13 +854,11 @@ tcp_clean_death(tcp_t *tcp, int err) if (!tcp->tcp_tconnind_started) { CONN_DEC_REF(connp); } else { - int32_t oldstate = tcp->tcp_state; - tcp->tcp_state = TCPS_BOUND; DTRACE_TCP6(state__change, void, NULL, ip_xmit_attr_t *, connp->conn_ixa, void, NULL, tcp_t *, tcp, void, NULL, - int32_t, oldstate); + int32_t, TCPS_CLOSED); } } else { tcp_close_detached(tcp); @@ -948,6 +947,9 @@ tcp_clean_death(tcp_t *tcp, int err) if (tcp->tcp_listener != NULL && IPCL_IS_NONSTR(connp)) { tcp_closei_local(tcp); tcp->tcp_state = TCPS_BOUND; + DTRACE_TCP6(state__change, void, NULL, ip_xmit_attr_t *, + connp->conn_ixa, void, NULL, tcp_t *, tcp, void, NULL, + int32_t, TCPS_CLOSED); return (0); } @@ -3699,10 +3701,6 @@ tcp_ddi_g_init(void) * set of tcp_stack_t's. */ netstack_register(NS_TCP, tcp_stack_init, NULL, tcp_stack_fini); - - mutex_enter(&cpu_lock); - register_cpu_setup_func(tcp_cpu_update, NULL); - mutex_exit(&cpu_lock); } @@ -3803,7 +3801,9 @@ tcp_stack_init(netstackid_t stackid, netstack_t *ns) * are not freed until the stack is going away. So there is no need * to grab a lock to access the per CPU tcps_sc[x] pointer. */ + mutex_enter(&cpu_lock); tcps->tcps_sc_cnt = MAX(ncpus, boot_ncpus); + mutex_exit(&cpu_lock); tcps->tcps_sc = kmem_zalloc(max_ncpus * sizeof (tcp_stats_cpu_t *), KM_SLEEP); for (i = 0; i < tcps->tcps_sc_cnt; i++) { @@ -3824,10 +3824,6 @@ tcp_stack_init(netstackid_t stackid, netstack_t *ns) void tcp_ddi_g_destroy(void) { - mutex_enter(&cpu_lock); - unregister_cpu_setup_func(tcp_cpu_update, NULL); - mutex_exit(&cpu_lock); - tcp_g_kstat_fini(tcp_g_kstat); tcp_g_kstat = NULL; bzero(&tcp_g_statistics, sizeof (tcp_g_statistics)); |
