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