xref: /titanic_41/usr/src/uts/common/inet/sctp/sctp_tunables.c (revision 0b42f15ac52b077791d4ba079e8c163c592c3fda)
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  */
215dd46ab5SKacheong Poon 
226e91bba0SGirish Moodalbail /*
235dd46ab5SKacheong Poon  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
24*299625c6SSebastien Roy  * Copyright (c) 2013 by Delphix. All rights reserved.
256e91bba0SGirish Moodalbail  */
266e91bba0SGirish Moodalbail 
276e91bba0SGirish Moodalbail #include <inet/ip.h>
286e91bba0SGirish Moodalbail #include <inet/ip6.h>
296e91bba0SGirish Moodalbail #include <inet/sctp/sctp_stack.h>
306e91bba0SGirish Moodalbail #include <inet/sctp/sctp_impl.h>
316e91bba0SGirish Moodalbail #include <sys/sunddi.h>
326e91bba0SGirish Moodalbail 
336e91bba0SGirish Moodalbail /* Max size IP datagram is 64k - 1 */
346e91bba0SGirish Moodalbail #define	SCTP_MSS_MAX_IPV4 (IP_MAXPACKET - (sizeof (ipha_t) + \
356e91bba0SGirish Moodalbail 					sizeof (sctp_hdr_t)))
366e91bba0SGirish Moodalbail #define	SCTP_MSS_MAX_IPV6 (IP_MAXPACKET - (sizeof (ip6_t) + \
376e91bba0SGirish Moodalbail 					sizeof (sctp_hdr_t)))
386e91bba0SGirish Moodalbail /* Max of the above */
396e91bba0SGirish Moodalbail #define	SCTP_MSS_MAX	SCTP_MSS_MAX_IPV4
406e91bba0SGirish Moodalbail 
416e91bba0SGirish Moodalbail /*
425dd46ab5SKacheong Poon  * returns the current list of listener limit configuration.
435dd46ab5SKacheong Poon  */
445dd46ab5SKacheong Poon /* ARGSUSED */
455dd46ab5SKacheong Poon static int
sctp_listener_conf_get(netstack_t * stack,mod_prop_info_t * pinfo,const char * ifname,void * val,uint_t psize,uint_t flags)46*299625c6SSebastien Roy sctp_listener_conf_get(netstack_t *stack, mod_prop_info_t *pinfo,
47*299625c6SSebastien Roy     const char *ifname, void *val, uint_t psize, uint_t flags)
485dd46ab5SKacheong Poon {
49*299625c6SSebastien Roy 	sctp_stack_t	*sctps = stack->netstack_sctp;
505dd46ab5SKacheong Poon 	sctp_listener_t	*sl;
515dd46ab5SKacheong Poon 	char		*pval = val;
525dd46ab5SKacheong Poon 	size_t		nbytes = 0, tbytes = 0;
535dd46ab5SKacheong Poon 	uint_t		size;
545dd46ab5SKacheong Poon 	int		err = 0;
555dd46ab5SKacheong Poon 
565dd46ab5SKacheong Poon 	bzero(pval, psize);
575dd46ab5SKacheong Poon 	size = psize;
585dd46ab5SKacheong Poon 
595dd46ab5SKacheong Poon 	if (flags & (MOD_PROP_DEFAULT|MOD_PROP_PERM|MOD_PROP_POSSIBLE))
605dd46ab5SKacheong Poon 		return (0);
615dd46ab5SKacheong Poon 
625dd46ab5SKacheong Poon 	mutex_enter(&sctps->sctps_listener_conf_lock);
635dd46ab5SKacheong Poon 	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
645dd46ab5SKacheong Poon 	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
655dd46ab5SKacheong Poon 		if (psize == size)
665dd46ab5SKacheong Poon 			nbytes = snprintf(pval, size, "%d:%d",  sl->sl_port,
675dd46ab5SKacheong Poon 			    sl->sl_ratio);
685dd46ab5SKacheong Poon 		else
695dd46ab5SKacheong Poon 			nbytes = snprintf(pval, size, ",%d:%d",  sl->sl_port,
705dd46ab5SKacheong Poon 			    sl->sl_ratio);
715dd46ab5SKacheong Poon 		size -= nbytes;
725dd46ab5SKacheong Poon 		pval += nbytes;
735dd46ab5SKacheong Poon 		tbytes += nbytes;
745dd46ab5SKacheong Poon 		if (tbytes >= psize) {
755dd46ab5SKacheong Poon 			/* Buffer overflow, stop copying information */
765dd46ab5SKacheong Poon 			err = ENOBUFS;
775dd46ab5SKacheong Poon 			break;
785dd46ab5SKacheong Poon 		}
795dd46ab5SKacheong Poon 	}
805dd46ab5SKacheong Poon 
815dd46ab5SKacheong Poon 	mutex_exit(&sctps->sctps_listener_conf_lock);
825dd46ab5SKacheong Poon 	return (err);
835dd46ab5SKacheong Poon }
845dd46ab5SKacheong Poon 
855dd46ab5SKacheong Poon /*
865dd46ab5SKacheong Poon  * add a new listener limit configuration.
875dd46ab5SKacheong Poon  */
885dd46ab5SKacheong Poon /* ARGSUSED */
895dd46ab5SKacheong Poon static int
sctp_listener_conf_add(netstack_t * stack,cred_t * cr,mod_prop_info_t * pinfo,const char * ifname,const void * pval,uint_t flags)90*299625c6SSebastien Roy sctp_listener_conf_add(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
915dd46ab5SKacheong Poon     const char *ifname, const void* pval, uint_t flags)
925dd46ab5SKacheong Poon {
935dd46ab5SKacheong Poon 	sctp_listener_t	*new_sl;
945dd46ab5SKacheong Poon 	sctp_listener_t	*sl;
955dd46ab5SKacheong Poon 	long		lport;
965dd46ab5SKacheong Poon 	long		ratio;
975dd46ab5SKacheong Poon 	char		*colon;
98*299625c6SSebastien Roy 	sctp_stack_t	*sctps = stack->netstack_sctp;
995dd46ab5SKacheong Poon 
1005dd46ab5SKacheong Poon 	if (flags & MOD_PROP_DEFAULT)
1015dd46ab5SKacheong Poon 		return (ENOTSUP);
1025dd46ab5SKacheong Poon 
1035dd46ab5SKacheong Poon 	if (ddi_strtol(pval, &colon, 10, &lport) != 0 || lport <= 0 ||
1045dd46ab5SKacheong Poon 	    lport > USHRT_MAX || *colon != ':') {
1055dd46ab5SKacheong Poon 		return (EINVAL);
1065dd46ab5SKacheong Poon 	}
1075dd46ab5SKacheong Poon 	if (ddi_strtol(colon + 1, NULL, 10, &ratio) != 0 || ratio <= 0)
1085dd46ab5SKacheong Poon 		return (EINVAL);
1095dd46ab5SKacheong Poon 
1105dd46ab5SKacheong Poon 	mutex_enter(&sctps->sctps_listener_conf_lock);
1115dd46ab5SKacheong Poon 	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
1125dd46ab5SKacheong Poon 	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
1135dd46ab5SKacheong Poon 		/* There is an existing entry, so update its ratio value. */
1145dd46ab5SKacheong Poon 		if (sl->sl_port == lport) {
1155dd46ab5SKacheong Poon 			sl->sl_ratio = ratio;
1165dd46ab5SKacheong Poon 			mutex_exit(&sctps->sctps_listener_conf_lock);
1175dd46ab5SKacheong Poon 			return (0);
1185dd46ab5SKacheong Poon 		}
1195dd46ab5SKacheong Poon 	}
1205dd46ab5SKacheong Poon 
1215dd46ab5SKacheong Poon 	if ((new_sl = kmem_alloc(sizeof (sctp_listener_t), KM_NOSLEEP)) ==
1225dd46ab5SKacheong Poon 	    NULL) {
1235dd46ab5SKacheong Poon 		mutex_exit(&sctps->sctps_listener_conf_lock);
1245dd46ab5SKacheong Poon 		return (ENOMEM);
1255dd46ab5SKacheong Poon 	}
1265dd46ab5SKacheong Poon 
1275dd46ab5SKacheong Poon 	new_sl->sl_port = lport;
1285dd46ab5SKacheong Poon 	new_sl->sl_ratio = ratio;
1295dd46ab5SKacheong Poon 	list_insert_tail(&sctps->sctps_listener_conf, new_sl);
1305dd46ab5SKacheong Poon 	mutex_exit(&sctps->sctps_listener_conf_lock);
1315dd46ab5SKacheong Poon 	return (0);
1325dd46ab5SKacheong Poon }
1335dd46ab5SKacheong Poon 
1345dd46ab5SKacheong Poon /*
1355dd46ab5SKacheong Poon  * remove a listener limit configuration.
1365dd46ab5SKacheong Poon  */
1375dd46ab5SKacheong Poon /* ARGSUSED */
1385dd46ab5SKacheong Poon static int
sctp_listener_conf_del(netstack_t * stack,cred_t * cr,mod_prop_info_t * pinfo,const char * ifname,const void * pval,uint_t flags)139*299625c6SSebastien Roy sctp_listener_conf_del(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
1405dd46ab5SKacheong Poon     const char *ifname, const void* pval, uint_t flags)
1415dd46ab5SKacheong Poon {
1425dd46ab5SKacheong Poon 	sctp_listener_t	*sl;
1435dd46ab5SKacheong Poon 	long		lport;
144*299625c6SSebastien Roy 	sctp_stack_t	*sctps = stack->netstack_sctp;
1455dd46ab5SKacheong Poon 
1465dd46ab5SKacheong Poon 	if (flags & MOD_PROP_DEFAULT)
1475dd46ab5SKacheong Poon 		return (ENOTSUP);
1485dd46ab5SKacheong Poon 
1495dd46ab5SKacheong Poon 	if (ddi_strtol(pval, NULL, 10, &lport) != 0 || lport <= 0 ||
1505dd46ab5SKacheong Poon 	    lport > USHRT_MAX) {
1515dd46ab5SKacheong Poon 		return (EINVAL);
1525dd46ab5SKacheong Poon 	}
1535dd46ab5SKacheong Poon 	mutex_enter(&sctps->sctps_listener_conf_lock);
1545dd46ab5SKacheong Poon 	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
1555dd46ab5SKacheong Poon 	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
1565dd46ab5SKacheong Poon 		if (sl->sl_port == lport) {
1575dd46ab5SKacheong Poon 			list_remove(&sctps->sctps_listener_conf, sl);
1585dd46ab5SKacheong Poon 			mutex_exit(&sctps->sctps_listener_conf_lock);
1595dd46ab5SKacheong Poon 			kmem_free(sl, sizeof (sctp_listener_t));
1605dd46ab5SKacheong Poon 			return (0);
1615dd46ab5SKacheong Poon 		}
1625dd46ab5SKacheong Poon 	}
1635dd46ab5SKacheong Poon 	mutex_exit(&sctps->sctps_listener_conf_lock);
1645dd46ab5SKacheong Poon 	return (ESRCH);
1655dd46ab5SKacheong Poon }
1665dd46ab5SKacheong Poon 
167*299625c6SSebastien Roy static int
sctp_set_buf_prop(netstack_t * stack,cred_t * cr,mod_prop_info_t * pinfo,const char * ifname,const void * pval,uint_t flags)168*299625c6SSebastien Roy sctp_set_buf_prop(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
169*299625c6SSebastien Roy     const char *ifname, const void *pval, uint_t flags)
170*299625c6SSebastien Roy {
171*299625c6SSebastien Roy 	return (mod_set_buf_prop(stack->netstack_sctp->sctps_propinfo_tbl,
172*299625c6SSebastien Roy 	    stack, cr, pinfo, ifname, pval, flags));
173*299625c6SSebastien Roy }
174*299625c6SSebastien Roy 
175*299625c6SSebastien Roy static int
sctp_get_buf_prop(netstack_t * stack,mod_prop_info_t * pinfo,const char * ifname,void * val,uint_t psize,uint_t flags)176*299625c6SSebastien Roy sctp_get_buf_prop(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
177*299625c6SSebastien Roy     void *val, uint_t psize, uint_t flags)
178*299625c6SSebastien Roy {
179*299625c6SSebastien Roy 	return (mod_get_buf_prop(stack->netstack_sctp->sctps_propinfo_tbl,
180*299625c6SSebastien Roy 	    stack, pinfo, ifname, val, psize, flags));
181*299625c6SSebastien Roy }
182*299625c6SSebastien Roy 
1835dd46ab5SKacheong Poon /*
1846e91bba0SGirish Moodalbail  * All of these are alterable, within the min/max values given, at run time.
1856e91bba0SGirish Moodalbail  *
1868887b57dSGirish Moodalbail  * Note: All those tunables which do not start with "_" are Committed and
1878887b57dSGirish Moodalbail  * therefore are public. See PSARC 2010/080.
1886e91bba0SGirish Moodalbail  */
1896e91bba0SGirish Moodalbail mod_prop_info_t sctp_propinfo_tbl[] = {
1908887b57dSGirish Moodalbail 	{ "_max_init_retr", MOD_PROTO_SCTP,
1916e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1926e91bba0SGirish Moodalbail 	    {0, 128, 8}, {8} },
1936e91bba0SGirish Moodalbail 
1948887b57dSGirish Moodalbail 	{ "_pa_max_retr", MOD_PROTO_SCTP,
1956e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
1966e91bba0SGirish Moodalbail 	    {1, 128, 10}, {10} },
1976e91bba0SGirish Moodalbail 
1988887b57dSGirish Moodalbail 	{ "_pp_max_retr", MOD_PROTO_SCTP,
1996e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2006e91bba0SGirish Moodalbail 	    {1, 128, 5}, {5} },
2016e91bba0SGirish Moodalbail 
2028887b57dSGirish Moodalbail 	{ "_cwnd_max", MOD_PROTO_SCTP,
2036e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
204*299625c6SSebastien Roy 	    {128, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
2056e91bba0SGirish Moodalbail 
2066e91bba0SGirish Moodalbail 	{ "smallest_nonpriv_port", MOD_PROTO_SCTP,
2076e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2086e91bba0SGirish Moodalbail 	    {1024, (32*1024), 1024}, {1024} },
2096e91bba0SGirish Moodalbail 
2108887b57dSGirish Moodalbail 	{ "_ipv4_ttl", MOD_PROTO_SCTP,
2116e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2126e91bba0SGirish Moodalbail 	    {1, 255, 64}, {64} },
2136e91bba0SGirish Moodalbail 
2148887b57dSGirish Moodalbail 	{ "_heartbeat_interval", MOD_PROTO_SCTP,
2156e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2166e91bba0SGirish Moodalbail 	    {0, 1*DAYS, 30*SECONDS}, {30*SECONDS} },
2176e91bba0SGirish Moodalbail 
2188887b57dSGirish Moodalbail 	{ "_initial_mtu", MOD_PROTO_SCTP,
2196e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2206e91bba0SGirish Moodalbail 	    {68, 65535, 1500}, {1500} },
2216e91bba0SGirish Moodalbail 
2228887b57dSGirish Moodalbail 	{ "_mtu_probe_interval", MOD_PROTO_SCTP,
2236e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2246e91bba0SGirish Moodalbail 	    {0, 1*DAYS, 10*MINUTES}, {10*MINUTES} },
2256e91bba0SGirish Moodalbail 
2268887b57dSGirish Moodalbail 	{ "_new_secret_interval", MOD_PROTO_SCTP,
2276e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2286e91bba0SGirish Moodalbail 	    {0, 1*DAYS, 2*MINUTES}, {2*MINUTES} },
2296e91bba0SGirish Moodalbail 
2306e91bba0SGirish Moodalbail 	/* tunable - 10 */
2318887b57dSGirish Moodalbail 	{ "_deferred_ack_interval", MOD_PROTO_SCTP,
2326e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2336e91bba0SGirish Moodalbail 	    {10*MS, 1*MINUTES, 100*MS}, {100*MS} },
2346e91bba0SGirish Moodalbail 
2358887b57dSGirish Moodalbail 	{ "_snd_lowat_fraction", MOD_PROTO_SCTP,
2366e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2376e91bba0SGirish Moodalbail 	    {0, 16, 0}, {0} },
2386e91bba0SGirish Moodalbail 
2398887b57dSGirish Moodalbail 	{ "_ignore_path_mtu", MOD_PROTO_SCTP,
2406e91bba0SGirish Moodalbail 	    mod_set_boolean, mod_get_boolean,
2416e91bba0SGirish Moodalbail 	    {B_FALSE}, {B_FALSE} },
2426e91bba0SGirish Moodalbail 
2438887b57dSGirish Moodalbail 	{ "_initial_ssthresh", MOD_PROTO_SCTP,
2446e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2456e91bba0SGirish Moodalbail 	    {1024, UINT32_MAX, SCTP_RECV_HIWATER}, { SCTP_RECV_HIWATER} },
2466e91bba0SGirish Moodalbail 
2476e91bba0SGirish Moodalbail 	{ "smallest_anon_port", MOD_PROTO_SCTP,
2486e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2496e91bba0SGirish Moodalbail 	    {1024, ULP_MAX_PORT, 32*1024}, {32*1024} },
2506e91bba0SGirish Moodalbail 
2516e91bba0SGirish Moodalbail 	{ "largest_anon_port", MOD_PROTO_SCTP,
2526e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2536e91bba0SGirish Moodalbail 	    {1024, ULP_MAX_PORT, ULP_MAX_PORT}, {ULP_MAX_PORT} },
2546e91bba0SGirish Moodalbail 
255*299625c6SSebastien Roy 	{ "send_buf", MOD_PROTO_SCTP,
256*299625c6SSebastien Roy 	    sctp_set_buf_prop, sctp_get_buf_prop,
257*299625c6SSebastien Roy 	    {SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_HIWATER},
2586e91bba0SGirish Moodalbail 	    {SCTP_XMIT_HIWATER} },
2596e91bba0SGirish Moodalbail 
2608887b57dSGirish Moodalbail 	{ "_xmit_lowat", MOD_PROTO_SCTP,
2616e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
262*299625c6SSebastien Roy 	    {SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_LOWATER},
2636e91bba0SGirish Moodalbail 	    {SCTP_XMIT_LOWATER} },
2646e91bba0SGirish Moodalbail 
265*299625c6SSebastien Roy 	{ "recv_buf", MOD_PROTO_SCTP,
266*299625c6SSebastien Roy 	    sctp_set_buf_prop, sctp_get_buf_prop,
267*299625c6SSebastien Roy 	    {SCTP_RECV_LOWATER,  ULP_MAX_BUF,  SCTP_RECV_HIWATER},
2686e91bba0SGirish Moodalbail 	    {SCTP_RECV_HIWATER} },
2696e91bba0SGirish Moodalbail 
270*299625c6SSebastien Roy 	{ "max_buf", MOD_PROTO_SCTP,
2716e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
272*299625c6SSebastien Roy 	    {8192, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
2736e91bba0SGirish Moodalbail 
2746e91bba0SGirish Moodalbail 	/* tunable - 20 */
2758887b57dSGirish Moodalbail 	{ "_rtt_updates", MOD_PROTO_SCTP,
2766e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2776e91bba0SGirish Moodalbail 	    {0, 65536, 20}, {20} },
2786e91bba0SGirish Moodalbail 
2798887b57dSGirish Moodalbail 	{ "_ipv6_hoplimit", MOD_PROTO_SCTP,
2806e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2816e91bba0SGirish Moodalbail 	    {0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS}, {IPV6_DEFAULT_HOPS} },
2826e91bba0SGirish Moodalbail 
2838887b57dSGirish Moodalbail 	{ "_rto_min", MOD_PROTO_SCTP,
2846e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2856e91bba0SGirish Moodalbail 	    {500*MS, 60*SECONDS, 1*SECONDS}, {1*SECONDS} },
2866e91bba0SGirish Moodalbail 
2878887b57dSGirish Moodalbail 	{ "_rto_max", MOD_PROTO_SCTP,
2886e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2896e91bba0SGirish Moodalbail 	    {1*SECONDS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
2906e91bba0SGirish Moodalbail 
2918887b57dSGirish Moodalbail 	{ "_rto_initial", MOD_PROTO_SCTP,
2926e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2936e91bba0SGirish Moodalbail 	    {1*SECONDS, 60000*SECONDS, 3*SECONDS}, {3*SECONDS} },
2946e91bba0SGirish Moodalbail 
2958887b57dSGirish Moodalbail 	{ "_cookie_life", MOD_PROTO_SCTP,
2966e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
2976e91bba0SGirish Moodalbail 	    {10*MS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
2986e91bba0SGirish Moodalbail 
2998887b57dSGirish Moodalbail 	{ "_max_in_streams", MOD_PROTO_SCTP,
3006e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3016e91bba0SGirish Moodalbail 	    {1, UINT16_MAX, 32}, {32} },
3026e91bba0SGirish Moodalbail 
3038887b57dSGirish Moodalbail 	{ "_initial_out_streams", MOD_PROTO_SCTP,
3046e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3056e91bba0SGirish Moodalbail 	    {1, UINT16_MAX, 32}, {32} },
3066e91bba0SGirish Moodalbail 
3078887b57dSGirish Moodalbail 	{ "_shutack_wait_bound", MOD_PROTO_SCTP,
3086e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3096e91bba0SGirish Moodalbail 	    {0, 300*SECONDS, 60*SECONDS}, {60*SECONDS} },
3106e91bba0SGirish Moodalbail 
3118887b57dSGirish Moodalbail 	{ "_maxburst", MOD_PROTO_SCTP,
3126e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3136e91bba0SGirish Moodalbail 	    {2, 8, 4}, {4} },
3146e91bba0SGirish Moodalbail 
3156e91bba0SGirish Moodalbail 	/* tunable - 30 */
3168887b57dSGirish Moodalbail 	{ "_addip_enabled", MOD_PROTO_SCTP,
3176e91bba0SGirish Moodalbail 	    mod_set_boolean, mod_get_boolean,
3186e91bba0SGirish Moodalbail 	    {B_FALSE}, {B_FALSE} },
3196e91bba0SGirish Moodalbail 
3208887b57dSGirish Moodalbail 	{ "_recv_hiwat_minmss", MOD_PROTO_SCTP,
3216e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3226e91bba0SGirish Moodalbail 	    {1, 65536, 4}, {4} },
3236e91bba0SGirish Moodalbail 
3248887b57dSGirish Moodalbail 	{ "_slow_start_initial", MOD_PROTO_SCTP,
3256e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3266e91bba0SGirish Moodalbail 	    {1, 16, 4}, {4} },
3276e91bba0SGirish Moodalbail 
3288887b57dSGirish Moodalbail 	{ "_slow_start_after_idle", MOD_PROTO_SCTP,
3296e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3306e91bba0SGirish Moodalbail 	    {1, 16384, 4}, {4} },
3316e91bba0SGirish Moodalbail 
3328887b57dSGirish Moodalbail 	{ "_prsctp_enabled", MOD_PROTO_SCTP,
3336e91bba0SGirish Moodalbail 	    mod_set_boolean, mod_get_boolean,
3346e91bba0SGirish Moodalbail 	    {B_TRUE}, {B_TRUE} },
3356e91bba0SGirish Moodalbail 
3368887b57dSGirish Moodalbail 	{ "_fast_rxt_thresh", MOD_PROTO_SCTP,
3376e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3386e91bba0SGirish Moodalbail 	    {1, 10000, 3}, {3} },
3396e91bba0SGirish Moodalbail 
3408887b57dSGirish Moodalbail 	{ "_deferred_acks_max", MOD_PROTO_SCTP,
3416e91bba0SGirish Moodalbail 	    mod_set_uint32, mod_get_uint32,
3426e91bba0SGirish Moodalbail 	    { 1, 16, 2}, {2} },
3436e91bba0SGirish Moodalbail 
3446e91bba0SGirish Moodalbail 	/*
3456e91bba0SGirish Moodalbail 	 * sctp_wroff_xtra is the extra space in front of SCTP/IP header
3466e91bba0SGirish Moodalbail 	 * for link layer header.  It has to be a multiple of 8.
3476e91bba0SGirish Moodalbail 	 */
3488887b57dSGirish Moodalbail 	{ "_wroff_xtra", MOD_PROTO_SCTP,
3496e91bba0SGirish Moodalbail 	    mod_set_aligned, mod_get_uint32,
3506e91bba0SGirish Moodalbail 	    {0, 256, 32}, {32} },
3516e91bba0SGirish Moodalbail 
3526e91bba0SGirish Moodalbail 	{ "extra_priv_ports", MOD_PROTO_SCTP,
3536e91bba0SGirish Moodalbail 	    mod_set_extra_privports, mod_get_extra_privports,
3546e91bba0SGirish Moodalbail 	    {1, ULP_MAX_PORT, 0}, {0} },
3556e91bba0SGirish Moodalbail 
3568887b57dSGirish Moodalbail 	{ "_listener_limit_conf", MOD_PROTO_SCTP,
3575dd46ab5SKacheong Poon 	    NULL, sctp_listener_conf_get, {0}, {0} },
3585dd46ab5SKacheong Poon 
3598887b57dSGirish Moodalbail 	{ "_listener_limit_conf_add", MOD_PROTO_SCTP,
3605dd46ab5SKacheong Poon 	    sctp_listener_conf_add, NULL, {0}, {0} },
3615dd46ab5SKacheong Poon 
3628887b57dSGirish Moodalbail 	{ "_listener_limit_conf_del", MOD_PROTO_SCTP,
3635dd46ab5SKacheong Poon 	    sctp_listener_conf_del, NULL, {0}, {0} },
3645dd46ab5SKacheong Poon 
3656e91bba0SGirish Moodalbail 	{ "?", MOD_PROTO_SCTP, NULL, mod_get_allprop, {0}, {0} },
3666e91bba0SGirish Moodalbail 
3676e91bba0SGirish Moodalbail 	{ NULL, 0, NULL, NULL, {0}, {0} }
3686e91bba0SGirish Moodalbail };
3696e91bba0SGirish Moodalbail 
3706e91bba0SGirish Moodalbail int sctp_propinfo_count = A_CNT(sctp_propinfo_tbl);
371