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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tunables.h
          +++ new/usr/src/uts/common/inet/tunables.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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 (c) 1990 Mentat Inc.
       24 + * Copyright (c) 2013 by Delphix. All rights reserved.
  24   25   */
  25   26  
  26   27  #ifndef _INET_TUNABLES_H
  27   28  #define _INET_TUNABLES_H
  28   29  
  29   30  #include <sys/types.h>
  30   31  #include <net/if.h>
  31   32  #ifdef _KERNEL
  32   33  #include <sys/netstack.h>
  33   34  #endif
↓ open down ↓ 47 lines elided ↑ open up ↑
  81   82  #define MOD_PROTO_SCTP          0x20    /* property is applicable to SCTP */
  82   83  
  83   84  /* property is applicable to both IPV[4|6] */
  84   85  #define MOD_PROTO_IP            (MOD_PROTO_IPV4|MOD_PROTO_IPV6)
  85   86  
  86   87  #ifdef  _KERNEL
  87   88  
  88   89  typedef struct mod_prop_info_s mod_prop_info_t;
  89   90  
  90   91  /* set/get property callback functions */
  91      -typedef int     mod_prop_setf_t(void *, cred_t *, mod_prop_info_t *,
       92 +typedef int     mod_prop_setf_t(netstack_t *, cred_t *, mod_prop_info_t *,
  92   93                      const char *, const void *, uint_t);
  93      -typedef int     mod_prop_getf_t(void *, mod_prop_info_t *, const char *,
  94      -                    void *val, uint_t, uint_t);
       94 +typedef int     mod_prop_getf_t(netstack_t *, mod_prop_info_t *, const char *,
       95 +                    void *, uint_t, uint_t);
  95   96  
  96   97  typedef struct mod_propval_uint32_s {
  97   98          uint32_t        mod_propval_umin;
  98   99          uint32_t        mod_propval_umax;
  99  100          uint32_t        mod_propval_ucur;
 100  101  } mod_propval_uint32_t;
 101  102  
 102  103  /*
 103  104   * protocol property information
 104  105   */
↓ open down ↓ 37 lines elided ↑ open up ↑
 142  143  
 143  144  #define MB              (1024 * 1024)
 144  145  
 145  146  /* Largest TCP/UDP/SCTP port number */
 146  147  #define ULP_MAX_PORT    (64 * 1024 - 1)
 147  148  
 148  149  /* extra privilege ports for upper layer protocols, tcp, sctp and udp */
 149  150  #define ULP_DEF_EPRIV_PORT1     2049
 150  151  #define ULP_DEF_EPRIV_PORT2     4045
 151  152  
      153 +#define ULP_MAX_BUF     (1<<30) /* Largest possible send/receive buffer */
      154 +
 152  155  /* generic function to set/get global module properties */
 153  156  extern mod_prop_setf_t  mod_set_boolean, mod_set_uint32,
 154  157                          mod_set_aligned, mod_set_extra_privports;
 155  158  
 156  159  extern mod_prop_getf_t  mod_get_boolean, mod_get_uint32,
 157  160                          mod_get_allprop, mod_get_extra_privports;
 158  161  
 159      -extern int mod_uint32_value(const void *, mod_prop_info_t *, uint_t,
 160      -    unsigned long *);
      162 +extern int              mod_uint32_value(const void *, mod_prop_info_t *,
      163 +    uint_t, unsigned long *);
      164 +extern mod_prop_info_t  *mod_prop_lookup(mod_prop_info_t[], const char *,
      165 +    uint_t);
      166 +extern int              mod_set_buf_prop(mod_prop_info_t[], netstack_t *,
      167 +    cred_t *cr, mod_prop_info_t *, const char *, const void *, uint_t);
      168 +extern int              mod_get_buf_prop(mod_prop_info_t[], netstack_t *,
      169 +    mod_prop_info_t *, const char *, void *, uint_t, uint_t);
 161  170  
 162  171  #endif  /* _KERNEL */
 163  172  
 164  173  /*
 165  174   * End-system model definitions that include the weak/strong end-system
 166  175   * definitions in RFC 1122, Section 3.3.4.5. IP_WEAK_ES and IP_STRONG_ES
 167  176   * conform to the corresponding  RFC 1122 definitions. The IP_SRC_PRI_ES
 168  177   * hostmodel is similar to IP_WEAK_ES with one additional enhancement: for
 169  178   * a packet with source S2, destination D2, the route selection algorithm
 170  179   * will first attempt to find a route for the destination that goes out
↓ open down ↓ 17 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX