xref: /illumos-gate/usr/src/uts/common/inet/sctp/sctp_tunables.c (revision 5dd46ab5742d7db1cbb08dec7b64fa14930c02f7)
16e91bba0SGirish Moodalbail /*
26e91bba0SGirish Moodalbail  * CDDL HEADER START
36e91bba0SGirish Moodalbail  *
46e91bba0SGirish Moodalbail  * The contents of this file are subject to the terms of the
56e91bba0SGirish Moodalbail  * Common Development and Distribution License (the "License").
66e91bba0SGirish Moodalbail  * You may not use this file except in compliance with the License.
76e91bba0SGirish Moodalbail  *
86e91bba0SGirish Moodalbail  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96e91bba0SGirish Moodalbail  * or http://www.opensolaris.org/os/licensing.
106e91bba0SGirish Moodalbail  * See the License for the specific language governing permissions
116e91bba0SGirish Moodalbail  * and limitations under the License.
126e91bba0SGirish Moodalbail  *
136e91bba0SGirish Moodalbail  * When distributing Covered Code, include this CDDL HEADER in each
146e91bba0SGirish Moodalbail  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156e91bba0SGirish Moodalbail  * If applicable, add the following below this CDDL HEADER, with the
166e91bba0SGirish Moodalbail  * fields enclosed by brackets "[]" replaced with your own identifying
176e91bba0SGirish Moodalbail  * information: Portions Copyright [yyyy] [name of copyright owner]
186e91bba0SGirish Moodalbail  *
196e91bba0SGirish Moodalbail  * CDDL HEADER END
206e91bba0SGirish Moodalbail  */
21*5dd46ab5SKacheong Poon 
226e91bba0SGirish Moodalbail /*
23*5dd46ab5SKacheong Poon  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
246e91bba0SGirish Moodalbail  */
256e91bba0SGirish Moodalbail 
266e91bba0SGirish Moodalbail #include <inet/ip.h>
276e91bba0SGirish Moodalbail #include <inet/ip6.h>
286e91bba0SGirish Moodalbail #include <inet/sctp/sctp_stack.h>
296e91bba0SGirish Moodalbail #include <inet/sctp/sctp_impl.h>
306e91bba0SGirish Moodalbail #include <sys/sunddi.h>
316e91bba0SGirish Moodalbail 
326e91bba0SGirish Moodalbail /* Max size IP datagram is 64k - 1 */
336e91bba0SGirish Moodalbail #define	SCTP_MSS_MAX_IPV4 (IP_MAXPACKET - (sizeof (ipha_t) + \
346e91bba0SGirish Moodalbail 					sizeof (sctp_hdr_t)))
356e91bba0SGirish Moodalbail #define	SCTP_MSS_MAX_IPV6 (IP_MAXPACKET - (sizeof (ip6_t) + \
366e91bba0SGirish Moodalbail 					sizeof (sctp_hdr_t)))
376e91bba0SGirish Moodalbail /* Max of the above */
386e91bba0SGirish Moodalbail #define	SCTP_MSS_MAX	SCTP_MSS_MAX_IPV4
396e91bba0SGirish Moodalbail 
40*5dd46ab5SKacheong Poon /*
41*5dd46ab5SKacheong Poon  * returns the current list of listener limit configuration.
42*5dd46ab5SKacheong Poon  */
43*5dd46ab5SKacheong Poon /* ARGSUSED */
44*5dd46ab5SKacheong Poon static int
45*5dd46ab5SKacheong Poon sctp_listener_conf_get(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
46*5dd46ab5SKacheong Poon     void *val, uint_t psize, uint_t flags)
47*5dd46ab5SKacheong Poon {
48*5dd46ab5SKacheong Poon 	sctp_stack_t	*sctps = (sctp_stack_t *)cbarg;
49*5dd46ab5SKacheong Poon 	sctp_listener_t	*sl;
50*5dd46ab5SKacheong Poon 	char		*pval = val;
51*5dd46ab5SKacheong Poon 	size_t		nbytes = 0, tbytes = 0;
52*5dd46ab5SKacheong Poon 	uint_t		size;
53*5dd46ab5SKacheong Poon 	int		err = 0;
54*5dd46ab5SKacheong Poon 
55*5dd46ab5SKacheong Poon 	bzero(pval, psize);
56*5dd46ab5SKacheong Poon 	size = psize;
57*5dd46ab5SKacheong Poon 
58*5dd46ab5SKacheong Poon 	if (flags & (MOD_PROP_DEFAULT|MOD_PROP_PERM|MOD_PROP_POSSIBLE))
59*5dd46ab5SKacheong Poon 		return (0);
60*5dd46ab5SKacheong Poon 
61*5dd46ab5SKacheong Poon 	mutex_enter(&sctps->sctps_listener_conf_lock);
62*5dd46ab5SKacheong Poon 	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
63*5dd46ab5SKacheong Poon 	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
64*5dd46ab5SKacheong Poon 		if (psize == size)
65*5dd46ab5SKacheong Poon 			nbytes = snprintf(pval, size, "%d:%d",  sl->sl_port,
66*5dd46ab5SKacheong Poon 			    sl->sl_ratio);
67*5dd46ab5SKacheong Poon 		else
68*5dd46ab5SKacheong Poon 			nbytes = snprintf(pval, size, ",%d:%d",  sl->sl_port,
69*5dd46ab5SKacheong Poon 			    sl->sl_ratio);
70*5dd46ab5SKacheong Poon 		size -= nbytes;
71*5dd46ab5SKacheong Poon 		pval += nbytes;
72*5dd46ab5SKacheong Poon 		tbytes += nbytes;
73*5dd46ab5SKacheong Poon 		if (tbytes >= psize) {
74*5dd46ab5SKacheong Poon 			/* Buffer overflow, stop copying information */
75*5dd46ab5SKacheong Poon 			err = ENOBUFS;
76*5dd46ab5SKacheong Poon 			break;
77*5dd46ab5SKacheong Poon 		}
78*5dd46ab5SKacheong Poon 	}
79*5dd46ab5SKacheong Poon 
80*5dd46ab5SKacheong Poon 	mutex_exit(&sctps->sctps_listener_conf_lock);
81*5dd46ab5SKacheong Poon 	return (err);
82*5dd46ab5SKacheong Poon }
83*5dd46ab5SKacheong Poon 
84*5dd46ab5SKacheong Poon /*
85*5dd46ab5SKacheong Poon  * add a new listener limit configuration.
86*5dd46ab5SKacheong Poon  */
87*5dd46ab5SKacheong Poon /* ARGSUSED */
88*5dd46ab5SKacheong Poon static int
89*5dd46ab5SKacheong Poon sctp_listener_conf_add(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
90*5dd46ab5SKacheong Poon     const char *ifname, const void* pval, uint_t flags)
91*5dd46ab5SKacheong Poon {
92*5dd46ab5SKacheong Poon 	sctp_listener_t	*new_sl;
93*5dd46ab5SKacheong Poon 	sctp_listener_t	*sl;
94*5dd46ab5SKacheong Poon 	long		lport;
95*5dd46ab5SKacheong Poon 	long		ratio;
96*5dd46ab5SKacheong Poon 	char		*colon;
97*5dd46ab5SKacheong Poon 	sctp_stack_t	*sctps = (sctp_stack_t *)cbarg;
98*5dd46ab5SKacheong Poon 
99*5dd46ab5SKacheong Poon 	if (flags & MOD_PROP_DEFAULT)
100*5dd46ab5SKacheong Poon 		return (ENOTSUP);
101*5dd46ab5SKacheong Poon 
102*5dd46ab5SKacheong Poon 	if (ddi_strtol(pval, &colon, 10, &lport) != 0 || lport <= 0 ||
103*5dd46ab5SKacheong Poon 	    lport > USHRT_MAX || *colon != ':') {
104*5dd46ab5SKacheong Poon 		return (EINVAL);
105*5dd46ab5SKacheong Poon 	}
106*5dd46ab5SKacheong Poon 	if (ddi_strtol(colon + 1, NULL, 10, &ratio) != 0 || ratio <= 0)
107*5dd46ab5SKacheong Poon 		return (EINVAL);
108*5dd46ab5SKacheong Poon 
109*5dd46ab5SKacheong Poon 	mutex_enter(&sctps->sctps_listener_conf_lock);
110*5dd46ab5SKacheong Poon 	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
111*5dd46ab5SKacheong Poon 	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
112*5dd46ab5SKacheong Poon 		/* There is an existing entry, so update its ratio value. */
113*5dd46ab5SKacheong Poon 		if (sl->sl_port == lport) {
114*5dd46ab5SKacheong Poon 			sl->sl_ratio = ratio;
115*5dd46ab5SKacheong Poon 			mutex_exit(&sctps->sctps_listener_conf_lock);
116*5dd46ab5SKacheong Poon 			return (0);
117*5dd46ab5SKacheong Poon 		}
118*5dd46ab5SKacheong Poon 	}
119*5dd46ab5SKacheong Poon 
120*5dd46ab5SKacheong Poon 	if ((new_sl = kmem_alloc(sizeof (sctp_listener_t), KM_NOSLEEP)) ==
121*5dd46ab5SKacheong Poon 	    NULL) {
122*5dd46ab5SKacheong Poon 		mutex_exit(&sctps->sctps_listener_conf_lock);
123*5dd46ab5SKacheong Poon 		return (ENOMEM);
124*5dd46ab5SKacheong Poon 	}
125*5dd46ab5SKacheong Poon 
126*5dd46ab5SKacheong Poon 	new_sl->sl_port = lport;
127*5dd46ab5SKacheong Poon 	new_sl->sl_ratio = ratio;
128*5dd46ab5SKacheong Poon 	list_insert_tail(&sctps->sctps_listener_conf, new_sl);
129*5dd46ab5SKacheong Poon 	mutex_exit(&sctps->sctps_listener_conf_lock);
130*5dd46ab5SKacheong Poon 	return (0);
131*5dd46ab5SKacheong Poon }
132*5dd46ab5SKacheong Poon 
133*5dd46ab5SKacheong Poon /*
134*5dd46ab5SKacheong Poon  * remove a listener limit configuration.
135*5dd46ab5SKacheong Poon  */
136*5dd46ab5SKacheong Poon /* ARGSUSED */
137*5dd46ab5SKacheong Poon static int
138*5dd46ab5SKacheong Poon sctp_listener_conf_del(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
139*5dd46ab5SKacheong Poon     const char *ifname, const void* pval, uint_t flags)
140*5dd46ab5SKacheong Poon {
141*5dd46ab5SKacheong Poon 	sctp_listener_t	*sl;
142*5dd46ab5SKacheong Poon 	long		lport;
143*5dd46ab5SKacheong Poon 	sctp_stack_t	*sctps = (sctp_stack_t *)cbarg;
144*5dd46ab5SKacheong Poon 
145*5dd46ab5SKacheong Poon 	if (flags & MOD_PROP_DEFAULT)
146*5dd46ab5SKacheong Poon 		return (ENOTSUP);
147*5dd46ab5SKacheong Poon 
148*5dd46ab5SKacheong Poon 	if (ddi_strtol(pval, NULL, 10, &lport) != 0 || lport <= 0 ||
149*5dd46ab5SKacheong Poon 	    lport > USHRT_MAX) {
150*5dd46ab5SKacheong Poon 		return (EINVAL);
151*5dd46ab5SKacheong Poon 	}
152*5dd46ab5SKacheong Poon 	mutex_enter(&sctps->sctps_listener_conf_lock);
153*5dd46ab5SKacheong Poon 	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
154*5dd46ab5SKacheong Poon 	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
155*5dd46ab5SKacheong Poon 		if (sl->sl_port == lport) {
156*5dd46ab5SKacheong Poon 			list_remove(&sctps->sctps_listener_conf, sl);
157*5dd46ab5SKacheong Poon 			mutex_exit(&sctps->sctps_listener_conf_lock);
158*5dd46ab5SKacheong Poon 			kmem_free(sl, sizeof (sctp_listener_t));
159*5dd46ab5SKacheong Poon 			return (0);
160*5dd46ab5SKacheong Poon 		}
161*5dd46ab5SKacheong Poon 	}
162*5dd46ab5SKacheong Poon 	mutex_exit(&sctps->sctps_listener_conf_lock);
163*5dd46ab5SKacheong Poon 	return (ESRCH);
164*5dd46ab5SKacheong Poon }
165*5dd46ab5SKacheong Poon 
1666e91bba0SGirish Moodalbail /*
1676e91bba0SGirish Moodalbail  * All of these are alterable, within the min/max values given, at run time.
1686e91bba0SGirish Moodalbail  *
1696e91bba0SGirish Moodalbail  * Note: All those tunables which do not start with "sctp_" are Committed and
1706e91bba0SGirish Moodalbail  * therefore are public. See PSARC 2009/306.
1716e91bba0SGirish Moodalbail  */
1726e91bba0SGirish Moodalbail mod_prop_info_t sctp_propinfo_tbl[] = {
1736e91bba0SGirish Moodalbail 	{ "sctp_max_init_retr", MOD_PROTO_SCTP,
1746e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1756e91bba0SGirish Moodalbail 	    {0, 128, 8}, {8} },
1766e91bba0SGirish Moodalbail 
1776e91bba0SGirish Moodalbail 	{ "sctp_pa_max_retr", MOD_PROTO_SCTP,
1786e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1796e91bba0SGirish Moodalbail 	    {1, 128, 10}, {10} },
1806e91bba0SGirish Moodalbail 
1816e91bba0SGirish Moodalbail 	{ "sctp_pp_max_retr", MOD_PROTO_SCTP,
1826e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1836e91bba0SGirish Moodalbail 	    {1, 128, 5}, {5} },
1846e91bba0SGirish Moodalbail 
1856e91bba0SGirish Moodalbail 	{ "sctp_cwnd_max", MOD_PROTO_SCTP,
1866e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1876e91bba0SGirish Moodalbail 	    {128, (1<<30), 1024*1024}, {1024*1024} },
1886e91bba0SGirish Moodalbail 
1896e91bba0SGirish Moodalbail 	{ "smallest_nonpriv_port", MOD_PROTO_SCTP,
1906e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1916e91bba0SGirish Moodalbail 	    {1024, (32*1024), 1024}, {1024} },
1926e91bba0SGirish Moodalbail 
1936e91bba0SGirish Moodalbail 	{ "sctp_ipv4_ttl", MOD_PROTO_SCTP,
1946e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1956e91bba0SGirish Moodalbail 	    {1, 255, 64}, {64} },
1966e91bba0SGirish Moodalbail 
1976e91bba0SGirish Moodalbail 	{ "sctp_heartbeat_interval", MOD_PROTO_SCTP,
1986e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1996e91bba0SGirish Moodalbail 	    {0, 1*DAYS, 30*SECONDS}, {30*SECONDS} },
2006e91bba0SGirish Moodalbail 
2016e91bba0SGirish Moodalbail 	{ "sctp_initial_mtu", MOD_PROTO_SCTP,
2026e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2036e91bba0SGirish Moodalbail 	    {68, 65535, 1500}, {1500} },
2046e91bba0SGirish Moodalbail 
2056e91bba0SGirish Moodalbail 	{ "sctp_mtu_probe_interval", MOD_PROTO_SCTP,
2066e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2076e91bba0SGirish Moodalbail 	    {0, 1*DAYS, 10*MINUTES}, {10*MINUTES} },
2086e91bba0SGirish Moodalbail 
2096e91bba0SGirish Moodalbail 	{ "sctp_new_secret_interval", MOD_PROTO_SCTP,
2106e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2116e91bba0SGirish Moodalbail 	    {0, 1*DAYS, 2*MINUTES}, {2*MINUTES} },
2126e91bba0SGirish Moodalbail 
2136e91bba0SGirish Moodalbail 	/* tunable - 10 */
2146e91bba0SGirish Moodalbail 	{ "sctp_deferred_ack_interval", MOD_PROTO_SCTP,
2156e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2166e91bba0SGirish Moodalbail 	    {10*MS, 1*MINUTES, 100*MS}, {100*MS} },
2176e91bba0SGirish Moodalbail 
2186e91bba0SGirish Moodalbail 	{ "sctp_snd_lowat_fraction", MOD_PROTO_SCTP,
2196e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2206e91bba0SGirish Moodalbail 	    {0, 16, 0}, {0} },
2216e91bba0SGirish Moodalbail 
2226e91bba0SGirish Moodalbail 	{ "sctp_ignore_path_mtu", MOD_PROTO_SCTP,
2236e91bba0SGirish Moodalbail 	    mod_set_boolean, mod_get_boolean,
2246e91bba0SGirish Moodalbail 	    {B_FALSE}, {B_FALSE} },
2256e91bba0SGirish Moodalbail 
2266e91bba0SGirish Moodalbail 	{ "sctp_initial_ssthresh", MOD_PROTO_SCTP,
2276e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2286e91bba0SGirish Moodalbail 	    {1024, UINT32_MAX, SCTP_RECV_HIWATER}, { SCTP_RECV_HIWATER} },
2296e91bba0SGirish Moodalbail 
2306e91bba0SGirish Moodalbail 	{ "smallest_anon_port", MOD_PROTO_SCTP,
2316e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2326e91bba0SGirish Moodalbail 	    {1024, ULP_MAX_PORT, 32*1024}, {32*1024} },
2336e91bba0SGirish Moodalbail 
2346e91bba0SGirish Moodalbail 	{ "largest_anon_port", MOD_PROTO_SCTP,
2356e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2366e91bba0SGirish Moodalbail 	    {1024, ULP_MAX_PORT, ULP_MAX_PORT}, {ULP_MAX_PORT} },
2376e91bba0SGirish Moodalbail 
2386e91bba0SGirish Moodalbail 	{ "send_maxbuf", MOD_PROTO_SCTP,
2396e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2406e91bba0SGirish Moodalbail 	    {SCTP_XMIT_LOWATER,  (1<<30),  SCTP_XMIT_HIWATER},
2416e91bba0SGirish Moodalbail 	    {SCTP_XMIT_HIWATER} },
2426e91bba0SGirish Moodalbail 
2436e91bba0SGirish Moodalbail 	{ "sctp_xmit_lowat", MOD_PROTO_SCTP,
2446e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2456e91bba0SGirish Moodalbail 	    {SCTP_XMIT_LOWATER,  (1<<30),  SCTP_XMIT_LOWATER},
2466e91bba0SGirish Moodalbail 	    {SCTP_XMIT_LOWATER} },
2476e91bba0SGirish Moodalbail 
2486e91bba0SGirish Moodalbail 	{ "recv_maxbuf", MOD_PROTO_SCTP,
2496e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2506e91bba0SGirish Moodalbail 	    {SCTP_RECV_LOWATER,  (1<<30),  SCTP_RECV_HIWATER},
2516e91bba0SGirish Moodalbail 	    {SCTP_RECV_HIWATER} },
2526e91bba0SGirish Moodalbail 
2536e91bba0SGirish Moodalbail 	{ "sctp_max_buf", MOD_PROTO_SCTP,
2546e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2556e91bba0SGirish Moodalbail 	    {8192, (1<<30), 1024*1024}, {1024*1024} },
2566e91bba0SGirish Moodalbail 
2576e91bba0SGirish Moodalbail 	/* tunable - 20 */
2586e91bba0SGirish Moodalbail 	{ "sctp_rtt_updates", MOD_PROTO_SCTP,
2596e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2606e91bba0SGirish Moodalbail 	    {0, 65536, 20}, {20} },
2616e91bba0SGirish Moodalbail 
2626e91bba0SGirish Moodalbail 	{ "sctp_ipv6_hoplimit", MOD_PROTO_SCTP,
2636e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2646e91bba0SGirish Moodalbail 	    {0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS}, {IPV6_DEFAULT_HOPS} },
2656e91bba0SGirish Moodalbail 
2666e91bba0SGirish Moodalbail 	{ "sctp_rto_min", MOD_PROTO_SCTP,
2676e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2686e91bba0SGirish Moodalbail 	    {500*MS, 60*SECONDS, 1*SECONDS}, {1*SECONDS} },
2696e91bba0SGirish Moodalbail 
2706e91bba0SGirish Moodalbail 	{ "sctp_rto_max", MOD_PROTO_SCTP,
2716e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2726e91bba0SGirish Moodalbail 	    {1*SECONDS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
2736e91bba0SGirish Moodalbail 
2746e91bba0SGirish Moodalbail 	{ "sctp_rto_initial", MOD_PROTO_SCTP,
2756e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2766e91bba0SGirish Moodalbail 	    {1*SECONDS, 60000*SECONDS, 3*SECONDS}, {3*SECONDS} },
2776e91bba0SGirish Moodalbail 
2786e91bba0SGirish Moodalbail 	{ "sctp_cookie_life", MOD_PROTO_SCTP,
2796e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2806e91bba0SGirish Moodalbail 	    {10*MS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
2816e91bba0SGirish Moodalbail 
2826e91bba0SGirish Moodalbail 	{ "sctp_max_in_streams", MOD_PROTO_SCTP,
2836e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2846e91bba0SGirish Moodalbail 	    {1, UINT16_MAX, 32}, {32} },
2856e91bba0SGirish Moodalbail 
2866e91bba0SGirish Moodalbail 	{ "sctp_initial_out_streams", MOD_PROTO_SCTP,
2876e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2886e91bba0SGirish Moodalbail 	    {1, UINT16_MAX, 32}, {32} },
2896e91bba0SGirish Moodalbail 
2906e91bba0SGirish Moodalbail 	{ "sctp_shutack_wait_bound", MOD_PROTO_SCTP,
2916e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2926e91bba0SGirish Moodalbail 	    {0, 300*SECONDS, 60*SECONDS}, {60*SECONDS} },
2936e91bba0SGirish Moodalbail 
2946e91bba0SGirish Moodalbail 	{ "sctp_maxburst", MOD_PROTO_SCTP,
2956e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2966e91bba0SGirish Moodalbail 	    {2, 8, 4}, {4} },
2976e91bba0SGirish Moodalbail 
2986e91bba0SGirish Moodalbail 	/* tunable - 30 */
2996e91bba0SGirish Moodalbail 	{ "sctp_addip_enabled", MOD_PROTO_SCTP,
3006e91bba0SGirish Moodalbail 	    mod_set_boolean, mod_get_boolean,
3016e91bba0SGirish Moodalbail 	    {B_FALSE}, {B_FALSE} },
3026e91bba0SGirish Moodalbail 
3036e91bba0SGirish Moodalbail 	{ "sctp_recv_hiwat_minmss", MOD_PROTO_SCTP,
3046e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3056e91bba0SGirish Moodalbail 	    {1, 65536, 4}, {4} },
3066e91bba0SGirish Moodalbail 
3076e91bba0SGirish Moodalbail 	{ "sctp_slow_start_initial", MOD_PROTO_SCTP,
3086e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3096e91bba0SGirish Moodalbail 	    {1, 16, 4}, {4} },
3106e91bba0SGirish Moodalbail 
3116e91bba0SGirish Moodalbail 	{ "sctp_slow_start_after_idle", MOD_PROTO_SCTP,
3126e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3136e91bba0SGirish Moodalbail 	    {1, 16384, 4}, {4} },
3146e91bba0SGirish Moodalbail 
3156e91bba0SGirish Moodalbail 	{ "sctp_prsctp_enabled", MOD_PROTO_SCTP,
3166e91bba0SGirish Moodalbail 	    mod_set_boolean, mod_get_boolean,
3176e91bba0SGirish Moodalbail 	    {B_TRUE}, {B_TRUE} },
3186e91bba0SGirish Moodalbail 
3196e91bba0SGirish Moodalbail 	{ "sctp_fast_rxt_thresh", MOD_PROTO_SCTP,
3206e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3216e91bba0SGirish Moodalbail 	    {1, 10000, 3}, {3} },
3226e91bba0SGirish Moodalbail 
3236e91bba0SGirish Moodalbail 	{ "sctp_deferred_acks_max", MOD_PROTO_SCTP,
3246e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3256e91bba0SGirish Moodalbail 	    { 1, 16, 2}, {2} },
3266e91bba0SGirish Moodalbail 
3276e91bba0SGirish Moodalbail 	/*
3286e91bba0SGirish Moodalbail 	 * sctp_wroff_xtra is the extra space in front of SCTP/IP header
3296e91bba0SGirish Moodalbail 	 * for link layer header.  It has to be a multiple of 8.
3306e91bba0SGirish Moodalbail 	 */
3316e91bba0SGirish Moodalbail 	{ "sctp_wroff_xtra", MOD_PROTO_SCTP,
3326e91bba0SGirish Moodalbail 	    mod_set_aligned, mod_get_uint32,
3336e91bba0SGirish Moodalbail 	    {0, 256, 32}, {32} },
3346e91bba0SGirish Moodalbail 
3356e91bba0SGirish Moodalbail 	{ "extra_priv_ports", MOD_PROTO_SCTP,
3366e91bba0SGirish Moodalbail 	    mod_set_extra_privports, mod_get_extra_privports,
3376e91bba0SGirish Moodalbail 	    {1, ULP_MAX_PORT, 0}, {0} },
3386e91bba0SGirish Moodalbail 
339*5dd46ab5SKacheong Poon 	{ "sctp_listener_limit_conf", MOD_PROTO_SCTP,
340*5dd46ab5SKacheong Poon 	    NULL, sctp_listener_conf_get, {0}, {0} },
341*5dd46ab5SKacheong Poon 
342*5dd46ab5SKacheong Poon 	{ "sctp_listener_limit_conf_add", MOD_PROTO_SCTP,
343*5dd46ab5SKacheong Poon 	    sctp_listener_conf_add, NULL, {0}, {0} },
344*5dd46ab5SKacheong Poon 
345*5dd46ab5SKacheong Poon 	{ "sctp_listener_limit_conf_del", MOD_PROTO_SCTP,
346*5dd46ab5SKacheong Poon 	    sctp_listener_conf_del, NULL, {0}, {0} },
347*5dd46ab5SKacheong Poon 
3486e91bba0SGirish Moodalbail 	{ "?", MOD_PROTO_SCTP, NULL, mod_get_allprop, {0}, {0} },
3496e91bba0SGirish Moodalbail 
3506e91bba0SGirish Moodalbail 	{ NULL, 0, NULL, NULL, {0}, {0} }
3516e91bba0SGirish Moodalbail };
3526e91bba0SGirish Moodalbail 
3536e91bba0SGirish Moodalbail int sctp_propinfo_count = A_CNT(sctp_propinfo_tbl);
354