Print this page
3942 inject sanity into ipadm tcp buffer size properties
3943 _snd_lowat_fraction tcp tunable has no effect
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Peng Dai <peng.dai@delphix.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/inet/tcp/tcp_tunables.c
+++ new/usr/src/uts/common/inet/tcp/tcp_tunables.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 * Copyright (c) 2011, Joyent Inc. All rights reserved.
24 24 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
25 + * Copyright (c) 2013 by Delphix. All rights reserved.
25 26 */
26 27 /* Copyright (c) 1990 Mentat Inc. */
27 28
28 29 #include <inet/ip.h>
29 30 #include <inet/tcp_impl.h>
30 31 #include <sys/multidata.h>
31 32 #include <sys/sunddi.h>
32 33
33 34 /* Max size IP datagram is 64k - 1 */
34 35 #define TCP_MSS_MAX_IPV4 (IP_MAXPACKET - (sizeof (ipha_t) + sizeof (tcpha_t)))
35 36 #define TCP_MSS_MAX_IPV6 (IP_MAXPACKET - (sizeof (ip6_t) + sizeof (tcpha_t)))
36 37
37 38 /* Max of the above */
38 39 #define TCP_MSS_MAX TCP_MSS_MAX_IPV4
39 40
40 -#define TCP_XMIT_LOWATER 4096
41 -#define TCP_XMIT_HIWATER 49152
42 -#define TCP_RECV_LOWATER 2048
43 -#define TCP_RECV_HIWATER 128000
44 -
45 41 /*
46 42 * Set the RFC 1948 pass phrase
47 43 */
48 44 /* ARGSUSED */
49 45 static int
50 -tcp_set_1948phrase(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
46 +tcp_set_1948phrase(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
51 47 const char *ifname, const void* pr_val, uint_t flags)
52 48 {
53 - tcp_stack_t *tcps = (tcp_stack_t *)cbarg;
54 -
55 49 if (flags & MOD_PROP_DEFAULT)
56 50 return (ENOTSUP);
57 51
58 52 /*
59 53 * Basically, value contains a new pass phrase. Pass it along!
60 54 */
61 - tcp_iss_key_init((uint8_t *)pr_val, strlen(pr_val), tcps);
55 + tcp_iss_key_init((uint8_t *)pr_val, strlen(pr_val),
56 + stack->netstack_tcp);
62 57 return (0);
63 58 }
64 59
65 60 /*
66 61 * returns the current list of listener limit configuration.
67 62 */
68 63 /* ARGSUSED */
69 64 static int
70 -tcp_listener_conf_get(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
71 - void *val, uint_t psize, uint_t flags)
65 +tcp_listener_conf_get(netstack_t *stack, mod_prop_info_t *pinfo,
66 + const char *ifname, void *val, uint_t psize, uint_t flags)
72 67 {
73 - tcp_stack_t *tcps = (tcp_stack_t *)cbarg;
68 + tcp_stack_t *tcps = stack->netstack_tcp;
74 69 tcp_listener_t *tl;
75 70 char *pval = val;
76 71 size_t nbytes = 0, tbytes = 0;
77 72 uint_t size;
78 73 int err = 0;
79 74
80 75 bzero(pval, psize);
81 76 size = psize;
82 77
83 78 if (flags & (MOD_PROP_DEFAULT|MOD_PROP_PERM|MOD_PROP_POSSIBLE))
84 79 return (0);
85 80
86 81 mutex_enter(&tcps->tcps_listener_conf_lock);
87 82 for (tl = list_head(&tcps->tcps_listener_conf); tl != NULL;
88 83 tl = list_next(&tcps->tcps_listener_conf, tl)) {
89 84 if (psize == size)
90 85 nbytes = snprintf(pval, size, "%d:%d", tl->tl_port,
91 86 tl->tl_ratio);
92 87 else
93 88 nbytes = snprintf(pval, size, ",%d:%d", tl->tl_port,
94 89 tl->tl_ratio);
95 90 size -= nbytes;
96 91 pval += nbytes;
97 92 tbytes += nbytes;
98 93 if (tbytes >= psize) {
99 94 /* Buffer overflow, stop copying information */
100 95 err = ENOBUFS;
101 96 break;
102 97 }
103 98 }
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
104 99
105 100 mutex_exit(&tcps->tcps_listener_conf_lock);
106 101 return (err);
107 102 }
108 103
109 104 /*
110 105 * add a new listener limit configuration.
111 106 */
112 107 /* ARGSUSED */
113 108 static int
114 -tcp_listener_conf_add(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
109 +tcp_listener_conf_add(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
115 110 const char *ifname, const void* pval, uint_t flags)
116 111 {
117 112 tcp_listener_t *new_tl;
118 113 tcp_listener_t *tl;
119 114 long lport;
120 115 long ratio;
121 116 char *colon;
122 - tcp_stack_t *tcps = (tcp_stack_t *)cbarg;
117 + tcp_stack_t *tcps = stack->netstack_tcp;
123 118
124 119 if (flags & MOD_PROP_DEFAULT)
125 120 return (ENOTSUP);
126 121
127 122 if (ddi_strtol(pval, &colon, 10, &lport) != 0 || lport <= 0 ||
128 123 lport > USHRT_MAX || *colon != ':') {
129 124 return (EINVAL);
130 125 }
131 126 if (ddi_strtol(colon + 1, NULL, 10, &ratio) != 0 || ratio <= 0)
132 127 return (EINVAL);
133 128
134 129 mutex_enter(&tcps->tcps_listener_conf_lock);
135 130 for (tl = list_head(&tcps->tcps_listener_conf); tl != NULL;
136 131 tl = list_next(&tcps->tcps_listener_conf, tl)) {
137 132 /* There is an existing entry, so update its ratio value. */
138 133 if (tl->tl_port == lport) {
139 134 tl->tl_ratio = ratio;
140 135 mutex_exit(&tcps->tcps_listener_conf_lock);
141 136 return (0);
142 137 }
143 138 }
144 139
145 140 if ((new_tl = kmem_alloc(sizeof (tcp_listener_t), KM_NOSLEEP)) ==
146 141 NULL) {
147 142 mutex_exit(&tcps->tcps_listener_conf_lock);
148 143 return (ENOMEM);
149 144 }
150 145
151 146 new_tl->tl_port = lport;
152 147 new_tl->tl_ratio = ratio;
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
153 148 list_insert_tail(&tcps->tcps_listener_conf, new_tl);
154 149 mutex_exit(&tcps->tcps_listener_conf_lock);
155 150 return (0);
156 151 }
157 152
158 153 /*
159 154 * remove a listener limit configuration.
160 155 */
161 156 /* ARGSUSED */
162 157 static int
163 -tcp_listener_conf_del(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
158 +tcp_listener_conf_del(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
164 159 const char *ifname, const void* pval, uint_t flags)
165 160 {
166 161 tcp_listener_t *tl;
167 162 long lport;
168 - tcp_stack_t *tcps = (tcp_stack_t *)cbarg;
163 + tcp_stack_t *tcps = stack->netstack_tcp;
169 164
170 165 if (flags & MOD_PROP_DEFAULT)
171 166 return (ENOTSUP);
172 167
173 168 if (ddi_strtol(pval, NULL, 10, &lport) != 0 || lport <= 0 ||
174 169 lport > USHRT_MAX) {
175 170 return (EINVAL);
176 171 }
177 172 mutex_enter(&tcps->tcps_listener_conf_lock);
178 173 for (tl = list_head(&tcps->tcps_listener_conf); tl != NULL;
179 174 tl = list_next(&tcps->tcps_listener_conf, tl)) {
180 175 if (tl->tl_port == lport) {
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
181 176 list_remove(&tcps->tcps_listener_conf, tl);
182 177 mutex_exit(&tcps->tcps_listener_conf_lock);
183 178 kmem_free(tl, sizeof (tcp_listener_t));
184 179 return (0);
185 180 }
186 181 }
187 182 mutex_exit(&tcps->tcps_listener_conf_lock);
188 183 return (ESRCH);
189 184 }
190 185
186 +static int
187 +tcp_set_buf_prop(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
188 + const char *ifname, const void *pval, uint_t flags)
189 +{
190 + return (mod_set_buf_prop(stack->netstack_tcp->tcps_propinfo_tbl, stack,
191 + cr, pinfo, ifname, pval, flags));
192 +}
193 +
194 +static int
195 +tcp_get_buf_prop(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
196 + void *val, uint_t psize, uint_t flags)
197 +{
198 + return (mod_get_buf_prop(stack->netstack_tcp->tcps_propinfo_tbl, stack,
199 + pinfo, ifname, val, psize, flags));
200 +}
201 +
191 202 /*
192 203 * Special checkers for smallest/largest anonymous port so they don't
193 204 * ever happen to be (largest < smallest).
194 205 */
195 206 /* ARGSUSED */
196 207 static int
197 -tcp_smallest_anon_set(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
208 +tcp_smallest_anon_set(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
198 209 const char *ifname, const void *pval, uint_t flags)
199 210 {
200 211 unsigned long new_value;
201 - tcp_stack_t *tcps = (tcp_stack_t *)cbarg;
212 + tcp_stack_t *tcps = stack->netstack_tcp;
202 213 int err;
203 214
204 215 if ((err = mod_uint32_value(pval, pinfo, flags, &new_value)) != 0)
205 216 return (err);
206 217 /* mod_uint32_value() + pinfo guarantees we're in TCP port range. */
207 218 if ((uint32_t)new_value > tcps->tcps_largest_anon_port)
208 219 return (ERANGE);
209 220 pinfo->prop_cur_uval = (uint32_t)new_value;
210 221 return (0);
211 222 }
212 223
213 224 /* ARGSUSED */
214 225 static int
215 -tcp_largest_anon_set(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
226 +tcp_largest_anon_set(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
216 227 const char *ifname, const void *pval, uint_t flags)
217 228 {
218 229 unsigned long new_value;
219 - tcp_stack_t *tcps = (tcp_stack_t *)cbarg;
230 + tcp_stack_t *tcps = stack->netstack_tcp;
220 231 int err;
221 232
222 233 if ((err = mod_uint32_value(pval, pinfo, flags, &new_value)) != 0)
223 234 return (err);
224 235 /* mod_uint32_value() + pinfo guarantees we're in TCP port range. */
225 236 if ((uint32_t)new_value < tcps->tcps_smallest_anon_port)
226 237 return (ERANGE);
227 238 pinfo->prop_cur_uval = (uint32_t)new_value;
228 239 return (0);
229 240 }
230 241
231 242 /*
232 243 * All of these are alterable, within the min/max values given, at run time.
233 244 *
234 245 * Note: All those tunables which do not start with "_" are Committed and
235 246 * therefore are public. See PSARC 2010/080.
236 247 */
237 248 mod_prop_info_t tcp_propinfo_tbl[] = {
238 249 /* tunable - 0 */
239 250 { "_time_wait_interval", MOD_PROTO_TCP,
240 251 mod_set_uint32, mod_get_uint32,
241 252 {1*SECONDS, 10*MINUTES, 1*MINUTES}, {1*MINUTES} },
242 253
243 254 { "_conn_req_max_q", MOD_PROTO_TCP,
244 255 mod_set_uint32, mod_get_uint32,
245 256 {1, UINT32_MAX, 128}, {128} },
246 257
247 258 { "_conn_req_max_q0", MOD_PROTO_TCP,
248 259 mod_set_uint32, mod_get_uint32,
249 260 {0, UINT32_MAX, 1024}, {1024} },
250 261
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
251 262 { "_conn_req_min", MOD_PROTO_TCP,
252 263 mod_set_uint32, mod_get_uint32,
253 264 {1, 1024, 1}, {1} },
254 265
255 266 { "_conn_grace_period", MOD_PROTO_TCP,
256 267 mod_set_uint32, mod_get_uint32,
257 268 {0*MS, 20*SECONDS, 0*MS}, {0*MS} },
258 269
259 270 { "_cwnd_max", MOD_PROTO_TCP,
260 271 mod_set_uint32, mod_get_uint32,
261 - {128, (1<<30), 1024*1024}, {1024*1024} },
272 + {128, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
262 273
263 274 { "_debug", MOD_PROTO_TCP,
264 275 mod_set_uint32, mod_get_uint32,
265 276 {0, 10, 0}, {0} },
266 277
267 278 { "smallest_nonpriv_port", MOD_PROTO_TCP,
268 279 mod_set_uint32, mod_get_uint32,
269 280 {1024, (32*1024), 1024}, {1024} },
270 281
271 282 { "_ip_abort_cinterval", MOD_PROTO_TCP,
272 283 mod_set_uint32, mod_get_uint32,
273 284 {1*SECONDS, UINT32_MAX, 3*MINUTES}, {3*MINUTES} },
274 285
275 286 { "_ip_abort_linterval", MOD_PROTO_TCP,
276 287 mod_set_uint32, mod_get_uint32,
277 288 {1*SECONDS, UINT32_MAX, 3*MINUTES}, {3*MINUTES} },
278 289
279 290 /* tunable - 10 */
280 291 { "_ip_abort_interval", MOD_PROTO_TCP,
281 292 mod_set_uint32, mod_get_uint32,
282 293 {500*MS, UINT32_MAX, 5*MINUTES}, {5*MINUTES} },
283 294
284 295 { "_ip_notify_cinterval", MOD_PROTO_TCP,
285 296 mod_set_uint32, mod_get_uint32,
286 297 {1*SECONDS, UINT32_MAX, 10*SECONDS},
287 298 {10*SECONDS} },
288 299
289 300 { "_ip_notify_interval", MOD_PROTO_TCP,
290 301 mod_set_uint32, mod_get_uint32,
291 302 {500*MS, UINT32_MAX, 10*SECONDS}, {10*SECONDS} },
292 303
293 304 { "_ipv4_ttl", MOD_PROTO_TCP,
294 305 mod_set_uint32, mod_get_uint32,
295 306 {1, 255, 64}, {64} },
296 307
297 308 { "_keepalive_interval", MOD_PROTO_TCP,
298 309 mod_set_uint32, mod_get_uint32,
299 310 {10*SECONDS, 10*DAYS, 2*HOURS}, {2*HOURS} },
300 311
301 312 { "_maxpsz_multiplier", MOD_PROTO_TCP,
302 313 mod_set_uint32, mod_get_uint32,
303 314 {0, 100, 10}, {10} },
304 315
305 316 { "_mss_def_ipv4", MOD_PROTO_TCP,
306 317 mod_set_uint32, mod_get_uint32,
307 318 {1, TCP_MSS_MAX_IPV4, 536}, {536} },
308 319
309 320 { "_mss_max_ipv4", MOD_PROTO_TCP,
310 321 mod_set_uint32, mod_get_uint32,
311 322 {1, TCP_MSS_MAX_IPV4, TCP_MSS_MAX_IPV4},
312 323 {TCP_MSS_MAX_IPV4} },
313 324
314 325 { "_mss_min", MOD_PROTO_TCP,
315 326 mod_set_uint32, mod_get_uint32,
316 327 {1, TCP_MSS_MAX, 108}, {108} },
317 328
318 329 { "_naglim_def", MOD_PROTO_TCP,
319 330 mod_set_uint32, mod_get_uint32,
320 331 {1, (64*1024)-1, (4*1024)-1}, {(4*1024)-1} },
321 332
322 333 /* tunable - 20 */
323 334 { "_rexmit_interval_initial", MOD_PROTO_TCP,
324 335 mod_set_uint32, mod_get_uint32,
325 336 {1*MS, 20*SECONDS, 1*SECONDS}, {1*SECONDS} },
326 337
327 338 { "_rexmit_interval_max", MOD_PROTO_TCP,
328 339 mod_set_uint32, mod_get_uint32,
329 340 {1*MS, 2*HOURS, 60*SECONDS}, {60*SECONDS} },
330 341
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
331 342 { "_rexmit_interval_min", MOD_PROTO_TCP,
332 343 mod_set_uint32, mod_get_uint32,
333 344 {1*MS, 2*HOURS, 400*MS}, {400*MS} },
334 345
335 346 { "_deferred_ack_interval", MOD_PROTO_TCP,
336 347 mod_set_uint32, mod_get_uint32,
337 348 {1*MS, 1*MINUTES, 100*MS}, {100*MS} },
338 349
339 350 { "_snd_lowat_fraction", MOD_PROTO_TCP,
340 351 mod_set_uint32, mod_get_uint32,
341 - {0, 16, 0}, {0} },
352 + {0, 16, 10}, {10} },
342 353
343 354 { "_dupack_fast_retransmit", MOD_PROTO_TCP,
344 355 mod_set_uint32, mod_get_uint32,
345 356 {1, 10000, 3}, {3} },
346 357
347 358 { "_ignore_path_mtu", MOD_PROTO_TCP,
348 359 mod_set_boolean, mod_get_boolean,
349 360 {B_FALSE}, {B_FALSE} },
350 361
351 362 { "smallest_anon_port", MOD_PROTO_TCP,
352 363 tcp_smallest_anon_set, mod_get_uint32,
353 364 {1024, ULP_MAX_PORT, 32*1024}, {32*1024} },
354 365
355 366 { "largest_anon_port", MOD_PROTO_TCP,
356 367 tcp_largest_anon_set, mod_get_uint32,
357 368 {1024, ULP_MAX_PORT, ULP_MAX_PORT},
358 369 {ULP_MAX_PORT} },
359 370
360 - { "send_maxbuf", MOD_PROTO_TCP,
361 - mod_set_uint32, mod_get_uint32,
362 - {TCP_XMIT_LOWATER, (1<<30), TCP_XMIT_HIWATER},
371 + { "send_buf", MOD_PROTO_TCP,
372 + tcp_set_buf_prop, tcp_get_buf_prop,
373 + {TCP_XMIT_LOWATER, ULP_MAX_BUF, TCP_XMIT_HIWATER},
363 374 {TCP_XMIT_HIWATER} },
364 375
365 376 /* tunable - 30 */
366 377 { "_xmit_lowat", MOD_PROTO_TCP,
367 378 mod_set_uint32, mod_get_uint32,
368 - {TCP_XMIT_LOWATER, (1<<30), TCP_XMIT_LOWATER},
379 + {TCP_XMIT_LOWATER, ULP_MAX_BUF, TCP_XMIT_LOWATER},
369 380 {TCP_XMIT_LOWATER} },
370 381
371 - { "recv_maxbuf", MOD_PROTO_TCP,
372 - mod_set_uint32, mod_get_uint32,
373 - {TCP_RECV_LOWATER, (1<<30), TCP_RECV_HIWATER},
382 + { "recv_buf", MOD_PROTO_TCP,
383 + tcp_set_buf_prop, tcp_get_buf_prop,
384 + {TCP_RECV_LOWATER, ULP_MAX_BUF, TCP_RECV_HIWATER},
374 385 {TCP_RECV_HIWATER} },
375 386
376 387 { "_recv_hiwat_minmss", MOD_PROTO_TCP,
377 388 mod_set_uint32, mod_get_uint32,
378 389 {1, 65536, 4}, {4} },
379 390
380 391 { "_fin_wait_2_flush_interval", MOD_PROTO_TCP,
381 392 mod_set_uint32, mod_get_uint32,
382 393 {1*SECONDS, 2*HOURS, 60*SECONDS},
383 394 {60*SECONDS} },
384 395
385 - { "_max_buf", MOD_PROTO_TCP,
396 + { "max_buf", MOD_PROTO_TCP,
386 397 mod_set_uint32, mod_get_uint32,
387 - {8192, (1<<30), 1024*1024}, {1024*1024} },
398 + {8192, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
388 399
389 400 /*
390 401 * Question: What default value should I set for tcp_strong_iss?
391 402 */
392 403 { "_strong_iss", MOD_PROTO_TCP,
393 404 mod_set_uint32, mod_get_uint32,
394 405 {0, 2, 1}, {1} },
395 406
396 407 { "_rtt_updates", MOD_PROTO_TCP,
397 408 mod_set_uint32, mod_get_uint32,
398 409 {0, 65536, 20}, {20} },
399 410
400 411 { "_wscale_always", MOD_PROTO_TCP,
401 412 mod_set_boolean, mod_get_boolean,
402 413 {B_TRUE}, {B_TRUE} },
403 414
404 415 { "_tstamp_always", MOD_PROTO_TCP,
405 416 mod_set_boolean, mod_get_boolean,
406 417 {B_FALSE}, {B_FALSE} },
407 418
408 419 { "_tstamp_if_wscale", MOD_PROTO_TCP,
409 420 mod_set_boolean, mod_get_boolean,
410 421 {B_TRUE}, {B_TRUE} },
411 422
412 423 /* tunable - 40 */
413 424 { "_rexmit_interval_extra", MOD_PROTO_TCP,
414 425 mod_set_uint32, mod_get_uint32,
415 426 {0*MS, 2*HOURS, 0*MS}, {0*MS} },
416 427
417 428 { "_deferred_acks_max", MOD_PROTO_TCP,
418 429 mod_set_uint32, mod_get_uint32,
419 430 {0, 16, 2}, {2} },
420 431
421 432 { "_slow_start_after_idle", MOD_PROTO_TCP,
422 433 mod_set_uint32, mod_get_uint32,
423 434 {0, 16384, 0}, {0} },
424 435
425 436 { "_slow_start_initial", MOD_PROTO_TCP,
426 437 mod_set_uint32, mod_get_uint32,
427 438 {0, 16, 0}, {0} },
428 439
429 440 { "sack", MOD_PROTO_TCP,
430 441 mod_set_uint32, mod_get_uint32,
431 442 {0, 2, 2}, {2} },
432 443
433 444 { "_ipv6_hoplimit", MOD_PROTO_TCP,
434 445 mod_set_uint32, mod_get_uint32,
435 446 {0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS},
436 447 {IPV6_DEFAULT_HOPS} },
437 448
438 449 { "_mss_def_ipv6", MOD_PROTO_TCP,
439 450 mod_set_uint32, mod_get_uint32,
440 451 {1, TCP_MSS_MAX_IPV6, 1220}, {1220} },
441 452
442 453 { "_mss_max_ipv6", MOD_PROTO_TCP,
443 454 mod_set_uint32, mod_get_uint32,
444 455 {1, TCP_MSS_MAX_IPV6, TCP_MSS_MAX_IPV6},
445 456 {TCP_MSS_MAX_IPV6} },
446 457
447 458 { "_rev_src_routes", MOD_PROTO_TCP,
448 459 mod_set_boolean, mod_get_boolean,
449 460 {B_FALSE}, {B_FALSE} },
450 461
451 462 { "_local_dack_interval", MOD_PROTO_TCP,
452 463 mod_set_uint32, mod_get_uint32,
453 464 {10*MS, 500*MS, 50*MS}, {50*MS} },
454 465
455 466 /* tunable - 50 */
456 467 { "_local_dacks_max", MOD_PROTO_TCP,
457 468 mod_set_uint32, mod_get_uint32,
458 469 {0, 16, 8}, {8} },
459 470
460 471 { "ecn", MOD_PROTO_TCP,
461 472 mod_set_uint32, mod_get_uint32,
462 473 {0, 2, 1}, {1} },
463 474
464 475 { "_rst_sent_rate_enabled", MOD_PROTO_TCP,
465 476 mod_set_boolean, mod_get_boolean,
466 477 {B_TRUE}, {B_TRUE} },
467 478
468 479 { "_rst_sent_rate", MOD_PROTO_TCP,
469 480 mod_set_uint32, mod_get_uint32,
470 481 {0, UINT32_MAX, 40}, {40} },
471 482
472 483 { "_push_timer_interval", MOD_PROTO_TCP,
473 484 mod_set_uint32, mod_get_uint32,
474 485 {0, 100*MS, 50*MS}, {50*MS} },
475 486
476 487 { "_use_smss_as_mss_opt", MOD_PROTO_TCP,
477 488 mod_set_boolean, mod_get_boolean,
478 489 {B_FALSE}, {B_FALSE} },
479 490
480 491 { "_keepalive_abort_interval", MOD_PROTO_TCP,
481 492 mod_set_uint32, mod_get_uint32,
482 493 {0, UINT32_MAX, 8*MINUTES}, {8*MINUTES} },
483 494
484 495 /*
485 496 * tcp_wroff_xtra is the extra space in front of TCP/IP header for link
486 497 * layer header. It has to be a multiple of 8.
487 498 */
488 499 { "_wroff_xtra", MOD_PROTO_TCP,
489 500 mod_set_aligned, mod_get_uint32,
490 501 {0, 256, 32}, {32} },
491 502
492 503 { "_dev_flow_ctl", MOD_PROTO_TCP,
493 504 mod_set_boolean, mod_get_boolean,
494 505 {B_FALSE}, {B_FALSE} },
495 506
496 507 { "_reass_timeout", MOD_PROTO_TCP,
497 508 mod_set_uint32, mod_get_uint32,
498 509 {0, UINT32_MAX, 100*SECONDS}, {100*SECONDS} },
499 510
500 511 /* tunable - 60 */
501 512 { "extra_priv_ports", MOD_PROTO_TCP,
502 513 mod_set_extra_privports, mod_get_extra_privports,
503 514 {1, ULP_MAX_PORT, 0}, {0} },
504 515
505 516 { "_1948_phrase", MOD_PROTO_TCP,
506 517 tcp_set_1948phrase, NULL, {0}, {0} },
507 518
508 519 { "_listener_limit_conf", MOD_PROTO_TCP,
509 520 NULL, tcp_listener_conf_get, {0}, {0} },
510 521
511 522 { "_listener_limit_conf_add", MOD_PROTO_TCP,
512 523 tcp_listener_conf_add, NULL, {0}, {0} },
513 524
514 525 { "_listener_limit_conf_del", MOD_PROTO_TCP,
515 526 tcp_listener_conf_del, NULL, {0}, {0} },
516 527
517 528 { "_iss_incr", MOD_PROTO_TCP,
518 529 mod_set_uint32, mod_get_uint32,
519 530 {1, ISS_INCR, ISS_INCR},
520 531 {ISS_INCR} },
521 532
522 533 { "?", MOD_PROTO_TCP, NULL, mod_get_allprop, {0}, {0} },
523 534
524 535 { NULL, 0, NULL, NULL, {0}, {0} }
525 536 };
526 537
527 538 int tcp_propinfo_count = A_CNT(tcp_propinfo_tbl);
↓ open down ↓ |
130 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX