tcp_tunables.c revision 5dd46ab5742d7db1cbb08dec7b64fa14930c02f7
/*
* 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
*/
/*
*/
#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
#define TCP_XMIT_LOWATER 4096
#define TCP_XMIT_HIWATER 49152
#define TCP_RECV_LOWATER 2048
#define TCP_RECV_HIWATER 128000
/*
* 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);
}
/*
*
* Note: All those tunables which do not start with "tcp_" are Committed and
* therefore are public. See PSARC 2009/306.
*/
/* tunable - 0 */
{ "tcp_time_wait_interval", MOD_PROTO_TCP,
{ "tcp_conn_req_max_q", MOD_PROTO_TCP,
{ "tcp_conn_req_max_q0", MOD_PROTO_TCP,
{ "tcp_conn_req_min", MOD_PROTO_TCP,
{1, 1024, 1}, {1} },
{ "tcp_conn_grace_period", MOD_PROTO_TCP,
{ "tcp_cwnd_max", MOD_PROTO_TCP,
{128, (1<<30), 1024*1024}, {1024*1024} },
{ "tcp_debug", MOD_PROTO_TCP,
{0, 10, 0}, {0} },
{ "smallest_nonpriv_port", MOD_PROTO_TCP,
{1024, (32*1024), 1024}, {1024} },
{ "tcp_ip_abort_cinterval", MOD_PROTO_TCP,
{ "tcp_ip_abort_linterval", MOD_PROTO_TCP,
/* tunable - 10 */
{ "tcp_ip_abort_interval", MOD_PROTO_TCP,
{ "tcp_ip_notify_cinterval", MOD_PROTO_TCP,
{10*SECONDS} },
{ "tcp_ip_notify_interval", MOD_PROTO_TCP,
{ "tcp_ipv4_ttl", MOD_PROTO_TCP,
{1, 255, 64}, {64} },
{ "tcp_keepalive_interval", MOD_PROTO_TCP,
{ "tcp_maxpsz_multiplier", MOD_PROTO_TCP,
{0, 100, 10}, {10} },
{ "tcp_mss_def_ipv4", MOD_PROTO_TCP,
{ "tcp_mss_max_ipv4", MOD_PROTO_TCP,
{TCP_MSS_MAX_IPV4} },
{ "tcp_mss_min", MOD_PROTO_TCP,
{ "tcp_naglim_def", MOD_PROTO_TCP,
{1, (64*1024)-1, (4*1024)-1}, {(4*1024)-1} },
/* tunable - 20 */
{ "tcp_rexmit_interval_initial", MOD_PROTO_TCP,
{ "tcp_rexmit_interval_max", MOD_PROTO_TCP,
{ "tcp_rexmit_interval_min", MOD_PROTO_TCP,
{ "tcp_deferred_ack_interval", MOD_PROTO_TCP,
{ "tcp_snd_lowat_fraction", MOD_PROTO_TCP,
{0, 16, 0}, {0} },
{ "tcp_dupack_fast_retransmit", MOD_PROTO_TCP,
{1, 10000, 3}, {3} },
{ "tcp_ignore_path_mtu", MOD_PROTO_TCP,
{ "smallest_anon_port", MOD_PROTO_TCP,
{ "largest_anon_port", MOD_PROTO_TCP,
{ULP_MAX_PORT} },
{ "send_maxbuf", MOD_PROTO_TCP,
{TCP_XMIT_HIWATER} },
/* tunable - 30 */
{ "tcp_xmit_lowat", MOD_PROTO_TCP,
{TCP_XMIT_LOWATER} },
{ "recv_maxbuf", MOD_PROTO_TCP,
{TCP_RECV_HIWATER} },
{ "tcp_recv_hiwat_minmss", MOD_PROTO_TCP,
{1, 65536, 4}, {4} },
{ "tcp_fin_wait_2_flush_interval", MOD_PROTO_TCP,
{60*SECONDS} },
{ "tcp_max_buf", MOD_PROTO_TCP,
{8192, (1<<30), 1024*1024}, {1024*1024} },
/*
* Question: What default value should I set for tcp_strong_iss?
*/
{ "tcp_strong_iss", MOD_PROTO_TCP,
{0, 2, 1}, {1} },
{ "tcp_rtt_updates", MOD_PROTO_TCP,
{0, 65536, 20}, {20} },
{ "tcp_wscale_always", MOD_PROTO_TCP,
{ "tcp_tstamp_always", MOD_PROTO_TCP,
{ "tcp_tstamp_if_wscale", MOD_PROTO_TCP,
/* tunable - 40 */
{ "tcp_rexmit_interval_extra", MOD_PROTO_TCP,
{ "tcp_deferred_acks_max", MOD_PROTO_TCP,
{0, 16, 2}, {2} },
{ "tcp_slow_start_after_idle", MOD_PROTO_TCP,
{1, 16384, 4}, {4} },
{ "tcp_slow_start_initial", MOD_PROTO_TCP,
{1, 4, 4}, {4} },
{ "sack", MOD_PROTO_TCP,
{0, 2, 2}, {2} },
{ "tcp_ipv6_hoplimit", MOD_PROTO_TCP,
{0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS},
{IPV6_DEFAULT_HOPS} },
{ "tcp_mss_def_ipv6", MOD_PROTO_TCP,
{ "tcp_mss_max_ipv6", MOD_PROTO_TCP,
{TCP_MSS_MAX_IPV6} },
{ "tcp_rev_src_routes", MOD_PROTO_TCP,
{ "tcp_local_dack_interval", MOD_PROTO_TCP,
/* tunable - 50 */
{ "tcp_local_dacks_max", MOD_PROTO_TCP,
{0, 16, 8}, {8} },
{ "ecn", MOD_PROTO_TCP,
{0, 2, 1}, {1} },
{ "tcp_rst_sent_rate_enabled", MOD_PROTO_TCP,
{ "tcp_rst_sent_rate", MOD_PROTO_TCP,
{ "tcp_push_timer_interval", MOD_PROTO_TCP,
{ "tcp_use_smss_as_mss_opt", MOD_PROTO_TCP,
{ "tcp_keepalive_abort_interval", MOD_PROTO_TCP,
/*
* layer header. It has to be a multiple of 8.
*/
{ "tcp_wroff_xtra", MOD_PROTO_TCP,
{0, 256, 32}, {32} },
{ "tcp_dev_flow_ctl", MOD_PROTO_TCP,
{ "tcp_reass_timeout", MOD_PROTO_TCP,
/* tunable - 60 */
{ "extra_priv_ports", MOD_PROTO_TCP,
{1, ULP_MAX_PORT, 0}, {0} },
{ "tcp_1948_phrase", MOD_PROTO_TCP,
tcp_set_1948phrase, NULL, {0}, {0} },
{ "tcp_listener_limit_conf", MOD_PROTO_TCP,
NULL, tcp_listener_conf_get, {0}, {0} },
{ "tcp_listener_limit_conf_add", MOD_PROTO_TCP,
tcp_listener_conf_add, NULL, {0}, {0} },
{ "tcp_listener_limit_conf_del", MOD_PROTO_TCP,
tcp_listener_conf_del, NULL, {0}, {0} },
};