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>
*** 18,27 ****
--- 18,28 ----
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013 by Delphix. All rights reserved.
*/
/* Copyright (c) 1990 Mentat Inc. */
#include <inet/ip.h>
#include <inet/ip6.h>
*** 42,60 ****
* find the ill and set the value on it. On the other hand if we are modifying
* global property, modify the global value and set the value on all the ills.
*/
/* ARGSUSED */
static int
! ip_set_forwarding(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
char *end;
unsigned long new_value;
boolean_t per_ill, isv6;
ill_walk_context_t ctx;
ill_t *ill;
! ip_stack_t *ipst = (ip_stack_t *)cbarg;
if (flags & MOD_PROP_DEFAULT) {
new_value = pinfo->prop_def_bval;
} else {
if (ddi_strtoul(pval, &end, 10, &new_value) != 0 ||
--- 43,61 ----
* find the ill and set the value on it. On the other hand if we are modifying
* global property, modify the global value and set the value on all the ills.
*/
/* ARGSUSED */
static int
! ip_set_forwarding(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
char *end;
unsigned long new_value;
boolean_t per_ill, isv6;
ill_walk_context_t ctx;
ill_t *ill;
! ip_stack_t *ipst = stack->netstack_ip;
if (flags & MOD_PROP_DEFAULT) {
new_value = pinfo->prop_def_bval;
} else {
if (ddi_strtoul(pval, &end, 10, &new_value) != 0 ||
*** 92,108 ****
return (0);
}
static int
! ip_get_forwarding(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t pr_size, uint_t flags)
{
boolean_t value;
ill_walk_context_t ctx;
ill_t *ill;
! ip_stack_t *ipst = (ip_stack_t *)cbarg;
boolean_t get_def = (flags & MOD_PROP_DEFAULT);
boolean_t get_perm = (flags & MOD_PROP_PERM);
boolean_t isv6;
size_t nbytes = 0;
--- 93,109 ----
return (0);
}
static int
! ip_get_forwarding(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t pr_size, uint_t flags)
{
boolean_t value;
ill_walk_context_t ctx;
ill_t *ill;
! ip_stack_t *ipst = stack->netstack_ip;
boolean_t get_def = (flags & MOD_PROP_DEFAULT);
boolean_t get_perm = (flags & MOD_PROP_PERM);
boolean_t isv6;
size_t nbytes = 0;
*** 154,164 ****
* `ip_debug' is a global variable. So, we will be modifying the global
* variable here.
*/
/* ARGSUSED */
int
! ip_set_debug(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
unsigned long new_value;
int err;
--- 155,165 ----
* `ip_debug' is a global variable. So, we will be modifying the global
* variable here.
*/
/* ARGSUSED */
int
! ip_set_debug(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
unsigned long new_value;
int err;
*** 176,186 ****
* we retrieve the value from `pinfo'. However for the current value we
* retrieve the value from the global variable `ip_debug'
*/
/* ARGSUSED */
int
! ip_get_debug(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t psize, uint_t flags)
{
boolean_t get_def = (flags & MOD_PROP_DEFAULT);
boolean_t get_perm = (flags & MOD_PROP_PERM);
boolean_t get_range = (flags & MOD_PROP_POSSIBLE);
--- 177,187 ----
* we retrieve the value from `pinfo'. However for the current value we
* retrieve the value from the global variable `ip_debug'
*/
/* ARGSUSED */
int
! ip_get_debug(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t psize, uint_t flags)
{
boolean_t get_def = (flags & MOD_PROP_DEFAULT);
boolean_t get_perm = (flags & MOD_PROP_PERM);
boolean_t get_range = (flags & MOD_PROP_POSSIBLE);
*** 206,220 ****
* from active to transparent or from transparent to active, forward the
* new status to the filtering module (if loaded).
*/
/* ARGSUSED */
static int
! ip_set_cgtp_filter(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
unsigned long new_value;
! ip_stack_t *ipst = (ip_stack_t *)cbarg;
char *end;
if (flags & MOD_PROP_DEFAULT) {
new_value = pinfo->prop_def_bval;
} else {
--- 207,221 ----
* from active to transparent or from transparent to active, forward the
* new status to the filtering module (if loaded).
*/
/* ARGSUSED */
static int
! ip_set_cgtp_filter(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
unsigned long new_value;
! ip_stack_t *ipst = stack->netstack_ip;
char *end;
if (flags & MOD_PROP_DEFAULT) {
new_value = pinfo->prop_def_bval;
} else {
*** 263,278 ****
*
* -- ill_user_mtu is set by in.ndpd using SIOCSLIFLNKINFO and must lie between
* (IPV6_MIN_MTU/IP_MIN_MTU) and ill_max_frag.
*/
int
! ip_get_mtu(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t psize, uint_t flags)
{
ill_walk_context_t ctx;
ill_t *ill;
! ip_stack_t *ipst = (ip_stack_t *)cbarg;
boolean_t isv6;
uint32_t max_mtu, def_mtu;
size_t nbytes = 0;
if (!(flags & (MOD_PROP_DEFAULT|MOD_PROP_POSSIBLE)))
--- 264,279 ----
*
* -- ill_user_mtu is set by in.ndpd using SIOCSLIFLNKINFO and must lie between
* (IPV6_MIN_MTU/IP_MIN_MTU) and ill_max_frag.
*/
int
! ip_get_mtu(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t psize, uint_t flags)
{
ill_walk_context_t ctx;
ill_t *ill;
! ip_stack_t *ipst = stack->netstack_ip;
boolean_t isv6;
uint32_t max_mtu, def_mtu;
size_t nbytes = 0;
if (!(flags & (MOD_PROP_DEFAULT|MOD_PROP_POSSIBLE)))
*** 350,365 ****
}
}
/* ARGSUSED */
static int
! ip_set_src_multihoming(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
unsigned long new_value, old_value;
boolean_t isv6;
! ip_stack_t *ipst = (ip_stack_t *)cbarg;
int err;
old_value = pinfo->prop_cur_uval;
if ((err = mod_uint32_value(pval, pinfo, flags, &new_value)) != 0)
--- 351,366 ----
}
}
/* ARGSUSED */
static int
! ip_set_src_multihoming(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
unsigned long new_value, old_value;
boolean_t isv6;
! ip_stack_t *ipst = stack->netstack_ip;
int err;
old_value = pinfo->prop_cur_uval;
if ((err = mod_uint32_value(pval, pinfo, flags, &new_value)) != 0)
*** 371,385 ****
}
/* ARGSUSED */
static int
! ip_set_hostmodel(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
ip_hostmodel_t new_value, old_value;
! ip_stack_t *ipst = (ip_stack_t *)cbarg;
uint32_t old_src_multihoming;
int err;
ulong_t tmp;
boolean_t isv6;
--- 372,386 ----
}
/* ARGSUSED */
static int
! ip_set_hostmodel(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
const char *ifname, const void* pval, uint_t flags)
{
ip_hostmodel_t new_value, old_value;
! ip_stack_t *ipst = stack->netstack_ip;
uint32_t old_src_multihoming;
int err;
ulong_t tmp;
boolean_t isv6;
*** 444,458 ****
return (0);
}
/* ARGSUSED */
int
! ip_get_hostmodel(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t psize, uint_t flags)
{
boolean_t isv6 = (pinfo->mpi_proto == MOD_PROTO_IPV6);
! ip_stack_t *ipst = cbarg;
ip_hostmodel_t hostmodel;
if (psize < sizeof (hostmodel))
return (ENOBUFS);
bzero(pval, psize);
--- 445,459 ----
return (0);
}
/* ARGSUSED */
int
! ip_get_hostmodel(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
void *pval, uint_t psize, uint_t flags)
{
boolean_t isv6 = (pinfo->mpi_proto == MOD_PROTO_IPV6);
! ip_stack_t *ipst = stack->netstack_ip;
ip_hostmodel_t hostmodel;
if (psize < sizeof (hostmodel))
return (ENOBUFS);
bzero(pval, psize);