Print this page
7127  remove -Wno-missing-braces from Makefile.uts


 172             stack, cr, pinfo, ifname, pval, flags));
 173 }
 174 
 175 static int
 176 sctp_get_buf_prop(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
 177     void *val, uint_t psize, uint_t flags)
 178 {
 179         return (mod_get_buf_prop(stack->netstack_sctp->sctps_propinfo_tbl,
 180             stack, pinfo, ifname, val, psize, flags));
 181 }
 182 
 183 /*
 184  * All of these are alterable, within the min/max values given, at run time.
 185  *
 186  * Note: All those tunables which do not start with "_" are Committed and
 187  * therefore are public. See PSARC 2010/080.
 188  */
 189 mod_prop_info_t sctp_propinfo_tbl[] = {
 190         { "_max_init_retr", MOD_PROTO_SCTP,
 191             mod_set_uint32, mod_get_uint32,
 192             {0, 128, 8}, {8} },
 193 
 194         { "_pa_max_retr", MOD_PROTO_SCTP,
 195             mod_set_uint32, mod_get_uint32,
 196             {1, 128, 10}, {10} },
 197 
 198         { "_pp_max_retr", MOD_PROTO_SCTP,
 199             mod_set_uint32, mod_get_uint32,
 200             {1, 128, 5}, {5} },
 201 
 202         { "_cwnd_max", MOD_PROTO_SCTP,
 203             mod_set_uint32, mod_get_uint32,
 204             {128, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
 205 
 206         { "smallest_nonpriv_port", MOD_PROTO_SCTP,
 207             mod_set_uint32, mod_get_uint32,
 208             {1024, (32*1024), 1024}, {1024} },
 209 
 210         { "_ipv4_ttl", MOD_PROTO_SCTP,
 211             mod_set_uint32, mod_get_uint32,
 212             {1, 255, 64}, {64} },
 213 
 214         { "_heartbeat_interval", MOD_PROTO_SCTP,
 215             mod_set_uint32, mod_get_uint32,
 216             {0, 1*DAYS, 30*SECONDS}, {30*SECONDS} },
 217 
 218         { "_initial_mtu", MOD_PROTO_SCTP,
 219             mod_set_uint32, mod_get_uint32,
 220             {68, 65535, 1500}, {1500} },
 221 
 222         { "_mtu_probe_interval", MOD_PROTO_SCTP,
 223             mod_set_uint32, mod_get_uint32,
 224             {0, 1*DAYS, 10*MINUTES}, {10*MINUTES} },
 225 
 226         { "_new_secret_interval", MOD_PROTO_SCTP,
 227             mod_set_uint32, mod_get_uint32,
 228             {0, 1*DAYS, 2*MINUTES}, {2*MINUTES} },
 229 
 230         /* tunable - 10 */
 231         { "_deferred_ack_interval", MOD_PROTO_SCTP,
 232             mod_set_uint32, mod_get_uint32,
 233             {10*MS, 1*MINUTES, 100*MS}, {100*MS} },
 234 
 235         { "_snd_lowat_fraction", MOD_PROTO_SCTP,
 236             mod_set_uint32, mod_get_uint32,
 237             {0, 16, 0}, {0} },
 238 
 239         { "_ignore_path_mtu", MOD_PROTO_SCTP,
 240             mod_set_boolean, mod_get_boolean,
 241             {B_FALSE}, {B_FALSE} },
 242 
 243         { "_initial_ssthresh", MOD_PROTO_SCTP,
 244             mod_set_uint32, mod_get_uint32,
 245             {1024, UINT32_MAX, SCTP_RECV_HIWATER}, { SCTP_RECV_HIWATER} },
 246 
 247         { "smallest_anon_port", MOD_PROTO_SCTP,
 248             mod_set_uint32, mod_get_uint32,
 249             {1024, ULP_MAX_PORT, 32*1024}, {32*1024} },
 250 
 251         { "largest_anon_port", MOD_PROTO_SCTP,
 252             mod_set_uint32, mod_get_uint32,
 253             {1024, ULP_MAX_PORT, ULP_MAX_PORT}, {ULP_MAX_PORT} },
 254 
 255         { "send_buf", MOD_PROTO_SCTP,
 256             sctp_set_buf_prop, sctp_get_buf_prop,
 257             {SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_HIWATER},
 258             {SCTP_XMIT_HIWATER} },
 259 
 260         { "_xmit_lowat", MOD_PROTO_SCTP,
 261             mod_set_uint32, mod_get_uint32,
 262             {SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_LOWATER},
 263             {SCTP_XMIT_LOWATER} },
 264 
 265         { "recv_buf", MOD_PROTO_SCTP,
 266             sctp_set_buf_prop, sctp_get_buf_prop,
 267             {SCTP_RECV_LOWATER,  ULP_MAX_BUF,  SCTP_RECV_HIWATER},
 268             {SCTP_RECV_HIWATER} },
 269 
 270         { "max_buf", MOD_PROTO_SCTP,
 271             mod_set_uint32, mod_get_uint32,
 272             {8192, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
 273 
 274         /* tunable - 20 */
 275         { "_rtt_updates", MOD_PROTO_SCTP,
 276             mod_set_uint32, mod_get_uint32,
 277             {0, 65536, 20}, {20} },
 278 
 279         { "_ipv6_hoplimit", MOD_PROTO_SCTP,
 280             mod_set_uint32, mod_get_uint32,
 281             {0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS}, {IPV6_DEFAULT_HOPS} },
 282 
 283         { "_rto_min", MOD_PROTO_SCTP,
 284             mod_set_uint32, mod_get_uint32,
 285             {500*MS, 60*SECONDS, 1*SECONDS}, {1*SECONDS} },
 286 
 287         { "_rto_max", MOD_PROTO_SCTP,
 288             mod_set_uint32, mod_get_uint32,
 289             {1*SECONDS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
 290 
 291         { "_rto_initial", MOD_PROTO_SCTP,
 292             mod_set_uint32, mod_get_uint32,
 293             {1*SECONDS, 60000*SECONDS, 3*SECONDS}, {3*SECONDS} },
 294 
 295         { "_cookie_life", MOD_PROTO_SCTP,
 296             mod_set_uint32, mod_get_uint32,
 297             {10*MS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
 298 
 299         { "_max_in_streams", MOD_PROTO_SCTP,
 300             mod_set_uint32, mod_get_uint32,
 301             {1, UINT16_MAX, 32}, {32} },
 302 
 303         { "_initial_out_streams", MOD_PROTO_SCTP,
 304             mod_set_uint32, mod_get_uint32,
 305             {1, UINT16_MAX, 32}, {32} },
 306 
 307         { "_shutack_wait_bound", MOD_PROTO_SCTP,
 308             mod_set_uint32, mod_get_uint32,
 309             {0, 300*SECONDS, 60*SECONDS}, {60*SECONDS} },
 310 
 311         { "_maxburst", MOD_PROTO_SCTP,
 312             mod_set_uint32, mod_get_uint32,
 313             {2, 8, 4}, {4} },
 314 
 315         /* tunable - 30 */
 316         { "_addip_enabled", MOD_PROTO_SCTP,
 317             mod_set_boolean, mod_get_boolean,
 318             {B_FALSE}, {B_FALSE} },
 319 
 320         { "_recv_hiwat_minmss", MOD_PROTO_SCTP,
 321             mod_set_uint32, mod_get_uint32,
 322             {1, 65536, 4}, {4} },
 323 
 324         { "_slow_start_initial", MOD_PROTO_SCTP,
 325             mod_set_uint32, mod_get_uint32,
 326             {1, 16, 4}, {4} },
 327 
 328         { "_slow_start_after_idle", MOD_PROTO_SCTP,
 329             mod_set_uint32, mod_get_uint32,
 330             {1, 16384, 4}, {4} },
 331 
 332         { "_prsctp_enabled", MOD_PROTO_SCTP,
 333             mod_set_boolean, mod_get_boolean,
 334             {B_TRUE}, {B_TRUE} },
 335 
 336         { "_fast_rxt_thresh", MOD_PROTO_SCTP,
 337             mod_set_uint32, mod_get_uint32,
 338             {1, 10000, 3}, {3} },
 339 
 340         { "_deferred_acks_max", MOD_PROTO_SCTP,
 341             mod_set_uint32, mod_get_uint32,
 342             { 1, 16, 2}, {2} },
 343 
 344         /*
 345          * sctp_wroff_xtra is the extra space in front of SCTP/IP header
 346          * for link layer header.  It has to be a multiple of 8.
 347          */
 348         { "_wroff_xtra", MOD_PROTO_SCTP,
 349             mod_set_aligned, mod_get_uint32,
 350             {0, 256, 32}, {32} },
 351 
 352         { "extra_priv_ports", MOD_PROTO_SCTP,
 353             mod_set_extra_privports, mod_get_extra_privports,
 354             {1, ULP_MAX_PORT, 0}, {0} },
 355 
 356         { "_listener_limit_conf", MOD_PROTO_SCTP,
 357             NULL, sctp_listener_conf_get, {0}, {0} },
 358 
 359         { "_listener_limit_conf_add", MOD_PROTO_SCTP,
 360             sctp_listener_conf_add, NULL, {0}, {0} },
 361 
 362         { "_listener_limit_conf_del", MOD_PROTO_SCTP,
 363             sctp_listener_conf_del, NULL, {0}, {0} },
 364 
 365         { "?", MOD_PROTO_SCTP, NULL, mod_get_allprop, {0}, {0} },
 366 
 367         { NULL, 0, NULL, NULL, {0}, {0} }
 368 };
 369 
 370 int sctp_propinfo_count = A_CNT(sctp_propinfo_tbl);


 172             stack, cr, pinfo, ifname, pval, flags));
 173 }
 174 
 175 static int
 176 sctp_get_buf_prop(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
 177     void *val, uint_t psize, uint_t flags)
 178 {
 179         return (mod_get_buf_prop(stack->netstack_sctp->sctps_propinfo_tbl,
 180             stack, pinfo, ifname, val, psize, flags));
 181 }
 182 
 183 /*
 184  * All of these are alterable, within the min/max values given, at run time.
 185  *
 186  * Note: All those tunables which do not start with "_" are Committed and
 187  * therefore are public. See PSARC 2010/080.
 188  */
 189 mod_prop_info_t sctp_propinfo_tbl[] = {
 190         { "_max_init_retr", MOD_PROTO_SCTP,
 191             mod_set_uint32, mod_get_uint32,
 192             {{0, 128, 8}}, {8} },
 193 
 194         { "_pa_max_retr", MOD_PROTO_SCTP,
 195             mod_set_uint32, mod_get_uint32,
 196             {{1, 128, 10}}, {10} },
 197 
 198         { "_pp_max_retr", MOD_PROTO_SCTP,
 199             mod_set_uint32, mod_get_uint32,
 200             {{1, 128, 5}}, {5} },
 201 
 202         { "_cwnd_max", MOD_PROTO_SCTP,
 203             mod_set_uint32, mod_get_uint32,
 204             {{128, ULP_MAX_BUF, 1024*1024}}, {1024*1024} },
 205 
 206         { "smallest_nonpriv_port", MOD_PROTO_SCTP,
 207             mod_set_uint32, mod_get_uint32,
 208             {{1024, (32*1024), 1024}}, {1024} },
 209 
 210         { "_ipv4_ttl", MOD_PROTO_SCTP,
 211             mod_set_uint32, mod_get_uint32,
 212             {{1, 255, 64}}, {64} },
 213 
 214         { "_heartbeat_interval", MOD_PROTO_SCTP,
 215             mod_set_uint32, mod_get_uint32,
 216             {{0, 1*DAYS, 30*SECONDS}}, {30*SECONDS} },
 217 
 218         { "_initial_mtu", MOD_PROTO_SCTP,
 219             mod_set_uint32, mod_get_uint32,
 220             {{68, 65535, 1500}}, {1500} },
 221 
 222         { "_mtu_probe_interval", MOD_PROTO_SCTP,
 223             mod_set_uint32, mod_get_uint32,
 224             {{0, 1*DAYS, 10*MINUTES}}, {10*MINUTES} },
 225 
 226         { "_new_secret_interval", MOD_PROTO_SCTP,
 227             mod_set_uint32, mod_get_uint32,
 228             {{0, 1*DAYS, 2*MINUTES}}, {2*MINUTES} },
 229 
 230         /* tunable - 10 */
 231         { "_deferred_ack_interval", MOD_PROTO_SCTP,
 232             mod_set_uint32, mod_get_uint32,
 233             {{10*MS, 1*MINUTES, 100*MS}}, {100*MS} },
 234 
 235         { "_snd_lowat_fraction", MOD_PROTO_SCTP,
 236             mod_set_uint32, mod_get_uint32,
 237             {{0, 16, 0}}, {0} },
 238 
 239         { "_ignore_path_mtu", MOD_PROTO_SCTP,
 240             mod_set_boolean, mod_get_boolean,
 241             {.mpi_bval = B_FALSE}, {B_FALSE} },
 242 
 243         { "_initial_ssthresh", MOD_PROTO_SCTP,
 244             mod_set_uint32, mod_get_uint32,
 245             {{1024, UINT32_MAX, SCTP_RECV_HIWATER}}, { SCTP_RECV_HIWATER} },
 246 
 247         { "smallest_anon_port", MOD_PROTO_SCTP,
 248             mod_set_uint32, mod_get_uint32,
 249             {{1024, ULP_MAX_PORT, 32*1024}}, {32*1024} },
 250 
 251         { "largest_anon_port", MOD_PROTO_SCTP,
 252             mod_set_uint32, mod_get_uint32,
 253             {{1024, ULP_MAX_PORT, ULP_MAX_PORT}}, {ULP_MAX_PORT} },
 254 
 255         { "send_buf", MOD_PROTO_SCTP,
 256             sctp_set_buf_prop, sctp_get_buf_prop,
 257             {{SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_HIWATER}},
 258             {SCTP_XMIT_HIWATER} },
 259 
 260         { "_xmit_lowat", MOD_PROTO_SCTP,
 261             mod_set_uint32, mod_get_uint32,
 262             {{SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_LOWATER}},
 263             {SCTP_XMIT_LOWATER} },
 264 
 265         { "recv_buf", MOD_PROTO_SCTP,
 266             sctp_set_buf_prop, sctp_get_buf_prop,
 267             {{SCTP_RECV_LOWATER,  ULP_MAX_BUF,  SCTP_RECV_HIWATER}},
 268             {SCTP_RECV_HIWATER} },
 269 
 270         { "max_buf", MOD_PROTO_SCTP,
 271             mod_set_uint32, mod_get_uint32,
 272             {{8192, ULP_MAX_BUF, 1024*1024}}, {1024*1024} },
 273 
 274         /* tunable - 20 */
 275         { "_rtt_updates", MOD_PROTO_SCTP,
 276             mod_set_uint32, mod_get_uint32,
 277             {{0, 65536, 20}}, {20} },
 278 
 279         { "_ipv6_hoplimit", MOD_PROTO_SCTP,
 280             mod_set_uint32, mod_get_uint32,
 281             {{0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS}}, {IPV6_DEFAULT_HOPS} },
 282 
 283         { "_rto_min", MOD_PROTO_SCTP,
 284             mod_set_uint32, mod_get_uint32,
 285             {{500*MS, 60*SECONDS, 1*SECONDS}}, {1*SECONDS} },
 286 
 287         { "_rto_max", MOD_PROTO_SCTP,
 288             mod_set_uint32, mod_get_uint32,
 289             {{1*SECONDS, 60000*SECONDS, 60*SECONDS}}, {60*SECONDS} },
 290 
 291         { "_rto_initial", MOD_PROTO_SCTP,
 292             mod_set_uint32, mod_get_uint32,
 293             {{1*SECONDS, 60000*SECONDS, 3*SECONDS}}, {3*SECONDS} },
 294 
 295         { "_cookie_life", MOD_PROTO_SCTP,
 296             mod_set_uint32, mod_get_uint32,
 297             {{10*MS, 60000*SECONDS, 60*SECONDS}}, {60*SECONDS} },
 298 
 299         { "_max_in_streams", MOD_PROTO_SCTP,
 300             mod_set_uint32, mod_get_uint32,
 301             {{1, UINT16_MAX, 32}}, {32} },
 302 
 303         { "_initial_out_streams", MOD_PROTO_SCTP,
 304             mod_set_uint32, mod_get_uint32,
 305             {{1, UINT16_MAX, 32}}, {32} },
 306 
 307         { "_shutack_wait_bound", MOD_PROTO_SCTP,
 308             mod_set_uint32, mod_get_uint32,
 309             {{0, 300*SECONDS, 60*SECONDS}}, {60*SECONDS} },
 310 
 311         { "_maxburst", MOD_PROTO_SCTP,
 312             mod_set_uint32, mod_get_uint32,
 313             {{2, 8, 4}}, {4} },
 314 
 315         /* tunable - 30 */
 316         { "_addip_enabled", MOD_PROTO_SCTP,
 317             mod_set_boolean, mod_get_boolean,
 318             {.mpi_bval = B_FALSE}, {B_FALSE} },
 319 
 320         { "_recv_hiwat_minmss", MOD_PROTO_SCTP,
 321             mod_set_uint32, mod_get_uint32,
 322             {{1, 65536, 4}}, {4} },
 323 
 324         { "_slow_start_initial", MOD_PROTO_SCTP,
 325             mod_set_uint32, mod_get_uint32,
 326             {{1, 16, 4}}, {4} },
 327 
 328         { "_slow_start_after_idle", MOD_PROTO_SCTP,
 329             mod_set_uint32, mod_get_uint32,
 330             {{1, 16384, 4}}, {4} },
 331 
 332         { "_prsctp_enabled", MOD_PROTO_SCTP,
 333             mod_set_boolean, mod_get_boolean,
 334             {.mpi_bval = B_TRUE}, {B_TRUE} },
 335 
 336         { "_fast_rxt_thresh", MOD_PROTO_SCTP,
 337             mod_set_uint32, mod_get_uint32,
 338             {{1, 10000, 3}}, {3} },
 339 
 340         { "_deferred_acks_max", MOD_PROTO_SCTP,
 341             mod_set_uint32, mod_get_uint32,
 342             {{ 1, 16, 2}}, {2} },
 343 
 344         /*
 345          * sctp_wroff_xtra is the extra space in front of SCTP/IP header
 346          * for link layer header.  It has to be a multiple of 8.
 347          */
 348         { "_wroff_xtra", MOD_PROTO_SCTP,
 349             mod_set_aligned, mod_get_uint32,
 350             {{0, 256, 32}}, {32} },
 351 
 352         { "extra_priv_ports", MOD_PROTO_SCTP,
 353             mod_set_extra_privports, mod_get_extra_privports,
 354             {{1, ULP_MAX_PORT, 0}}, {0} },
 355 
 356         { "_listener_limit_conf", MOD_PROTO_SCTP,
 357             NULL, sctp_listener_conf_get, {{0,0,0}}, {0} },
 358 
 359         { "_listener_limit_conf_add", MOD_PROTO_SCTP,
 360             sctp_listener_conf_add, NULL, {{0,0,0}}, {0} },
 361 
 362         { "_listener_limit_conf_del", MOD_PROTO_SCTP,
 363             sctp_listener_conf_del, NULL, {{0,0,0}}, {0} },
 364 
 365         { "?", MOD_PROTO_SCTP, NULL, mod_get_allprop, {{0,0,0}}, {0} },
 366 
 367         { NULL, 0, NULL, NULL, {{0,0,0}}, {0} }
 368 };
 369 
 370 int sctp_propinfo_count = A_CNT(sctp_propinfo_tbl);