tcp_tunables.c revision 995de72901a2c8b79bd3aea3df1617643d53ea89
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
*/
/* Copyright (c) 1990 Mentat Inc. */
#include <inet/tcp_impl.h>
#include <sys/multidata.h>
/* Max size IP datagram is 64k - 1 */
/* Max of the above */
#define TCP_MSS_MAX TCP_MSS_MAX_IPV4
/*
* Set the RFC 1948 pass phrase
*/
/* ARGSUSED */
static int
{
if (flags & MOD_PROP_DEFAULT)
return (ENOTSUP);
/*
* Basically, value contains a new pass phrase. Pass it along!
*/
return (0);
}
/*
* returns the current list of listener limit configuration.
*/
/* ARGSUSED */
static int
{
int err = 0;
return (0);
else
/* Buffer overflow, stop copying information */
break;
}
}
return (err);
}
/*
* add a new listener limit configuration.
*/
/* ARGSUSED */
static int
{
long lport;
long ratio;
char *colon;
if (flags & MOD_PROP_DEFAULT)
return (ENOTSUP);
return (EINVAL);
}
return (EINVAL);
/* There is an existing entry, so update its ratio value. */
return (0);
}
}
NULL) {
return (ENOMEM);
}
return (0);
}
/*
* remove a listener limit configuration.
*/
/* ARGSUSED */
static int
{
long lport;
if (flags & MOD_PROP_DEFAULT)
return (ENOTSUP);
return (EINVAL);
}
return (0);
}
}
return (ESRCH);
}
static int
{
}
static int
{
}
/*
* ever happen to be (largest < smallest).
*/
/* ARGSUSED */
static int
{
unsigned long new_value;
int err;
return (err);
/* mod_uint32_value() + pinfo guarantees we're in TCP port range. */
return (ERANGE);
return (0);
}
/* ARGSUSED */
static int
{
unsigned long new_value;
int err;
return (err);
/* mod_uint32_value() + pinfo guarantees we're in TCP port range. */
return (ERANGE);
return (0);
}
/*
*
* Note: All those tunables which do not start with "_" are Committed and
* therefore are public. See PSARC 2010/080.
*/
/* tunable - 0 */
{ "_time_wait_interval", MOD_PROTO_TCP,
{ "_conn_req_max_q", MOD_PROTO_TCP,
{ "_conn_req_max_q0", MOD_PROTO_TCP,
{ "_conn_req_min", MOD_PROTO_TCP,
{1, 1024, 1}, {1} },
{ "_conn_grace_period", MOD_PROTO_TCP,
{ "_cwnd_max", MOD_PROTO_TCP,
{ "_debug", MOD_PROTO_TCP,
{0, 10, 0}, {0} },
{ "smallest_nonpriv_port", MOD_PROTO_TCP,
{1024, (32*1024), 1024}, {1024} },
{ "_ip_abort_cinterval", MOD_PROTO_TCP,
{ "_ip_abort_linterval", MOD_PROTO_TCP,
/* tunable - 10 */
{ "_ip_abort_interval", MOD_PROTO_TCP,
{ "_ip_notify_cinterval", MOD_PROTO_TCP,
{10*SECONDS} },
{ "_ip_notify_interval", MOD_PROTO_TCP,
{ "_ipv4_ttl", MOD_PROTO_TCP,
{1, 255, 64}, {64} },
{ "_keepalive_interval", MOD_PROTO_TCP,
{ "_maxpsz_multiplier", MOD_PROTO_TCP,
{0, 100, 10}, {10} },
{ "_mss_def_ipv4", MOD_PROTO_TCP,
{ "_mss_max_ipv4", MOD_PROTO_TCP,
{TCP_MSS_MAX_IPV4} },
{ "_mss_min", MOD_PROTO_TCP,
{ "_naglim_def", MOD_PROTO_TCP,
{1, (64*1024)-1, (4*1024)-1}, {(4*1024)-1} },
/* tunable - 20 */
{ "_rexmit_interval_initial", MOD_PROTO_TCP,
{ "_rexmit_interval_max", MOD_PROTO_TCP,
{ "_rexmit_interval_min", MOD_PROTO_TCP,
{ "_deferred_ack_interval", MOD_PROTO_TCP,
{ "_snd_lowat_fraction", MOD_PROTO_TCP,
{0, 16, 10}, {10} },
{ "_dupack_fast_retransmit", MOD_PROTO_TCP,
{1, 10000, 3}, {3} },
{ "_ignore_path_mtu", MOD_PROTO_TCP,
{ "smallest_anon_port", MOD_PROTO_TCP,
{ "largest_anon_port", MOD_PROTO_TCP,
{ULP_MAX_PORT} },
{ "send_buf", MOD_PROTO_TCP,
{TCP_XMIT_HIWATER} },
/* tunable - 30 */
{ "_xmit_lowat", MOD_PROTO_TCP,
{TCP_XMIT_LOWATER} },
{ "recv_buf", MOD_PROTO_TCP,
{TCP_RECV_HIWATER} },
{ "_recv_hiwat_minmss", MOD_PROTO_TCP,
{1, 65536, 4}, {4} },
{ "_fin_wait_2_flush_interval", MOD_PROTO_TCP,
{60*SECONDS} },
{ "max_buf", MOD_PROTO_TCP,
{ "_strong_iss", MOD_PROTO_TCP,
{0, 2, 2}, {2} },
{ "_rtt_updates", MOD_PROTO_TCP,
{0, 65536, 20}, {20} },
{ "_wscale_always", MOD_PROTO_TCP,
{ "_tstamp_always", MOD_PROTO_TCP,
{ "_tstamp_if_wscale", MOD_PROTO_TCP,
/* tunable - 40 */
{ "_rexmit_interval_extra", MOD_PROTO_TCP,
{ "_deferred_acks_max", MOD_PROTO_TCP,
{0, 16, 2}, {2} },
{ "_slow_start_after_idle", MOD_PROTO_TCP,
{0, 16384, 0}, {0} },
{ "_slow_start_initial", MOD_PROTO_TCP,
{0, 16, 0}, {0} },
{ "sack", MOD_PROTO_TCP,
{0, 2, 2}, {2} },
{ "_ipv6_hoplimit", MOD_PROTO_TCP,
{0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS},
{IPV6_DEFAULT_HOPS} },
{ "_mss_def_ipv6", MOD_PROTO_TCP,
{ "_mss_max_ipv6", MOD_PROTO_TCP,
{TCP_MSS_MAX_IPV6} },
{ "_rev_src_routes", MOD_PROTO_TCP,
{ "_local_dack_interval", MOD_PROTO_TCP,
/* tunable - 50 */
{ "_local_dacks_max", MOD_PROTO_TCP,
{0, 16, 8}, {8} },
{ "ecn", MOD_PROTO_TCP,
{0, 2, 1}, {1} },
{ "_rst_sent_rate_enabled", MOD_PROTO_TCP,
{ "_rst_sent_rate", MOD_PROTO_TCP,
{ "_push_timer_interval", MOD_PROTO_TCP,
{ "_use_smss_as_mss_opt", MOD_PROTO_TCP,
{ "_keepalive_abort_interval", MOD_PROTO_TCP,
/*
* layer header. It has to be a multiple of 8.
*/
{ "_wroff_xtra", MOD_PROTO_TCP,
{0, 256, 32}, {32} },
{ "_dev_flow_ctl", MOD_PROTO_TCP,
{ "_reass_timeout", MOD_PROTO_TCP,
/* tunable - 60 */
{ "extra_priv_ports", MOD_PROTO_TCP,
{1, ULP_MAX_PORT, 0}, {0} },
{ "_1948_phrase", MOD_PROTO_TCP,
tcp_set_1948phrase, NULL, {0}, {0} },
{ "_listener_limit_conf", MOD_PROTO_TCP,
NULL, tcp_listener_conf_get, {0}, {0} },
{ "_listener_limit_conf_add", MOD_PROTO_TCP,
tcp_listener_conf_add, NULL, {0}, {0} },
{ "_listener_limit_conf_del", MOD_PROTO_TCP,
tcp_listener_conf_del, NULL, {0}, {0} },
{ "_iss_incr", MOD_PROTO_TCP,
{ISS_INCR} },
};