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