Print this page
1915 IPsec kstats shouldn't be persistent

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ipsecah.c
          +++ new/usr/src/uts/common/inet/ip/ipsecah.c
↓ 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 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   * Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved.
       25 + * Copyright 2017 Joyent, Inc.
  25   26   */
  26   27  
  27   28  #include <sys/types.h>
  28   29  #include <sys/stream.h>
  29   30  #include <sys/stropts.h>
  30   31  #include <sys/errno.h>
  31   32  #include <sys/strlog.h>
  32   33  #include <sys/tihdr.h>
  33   34  #include <sys/socket.h>
  34   35  #include <sys/ddi.h>
↓ open down ↓ 131 lines elided ↑ open up ↑
 166  167  static int ah_kstat_update(kstat_t *, int);
 167  168  
 168  169  uint64_t ipsacq_maxpackets = IPSACQ_MAXPACKETS;
 169  170  
 170  171  static boolean_t
 171  172  ah_kstat_init(ipsecah_stack_t *ahstack, netstackid_t stackid)
 172  173  {
 173  174          ipsec_stack_t   *ipss = ahstack->ipsecah_netstack->netstack_ipsec;
 174  175  
 175  176          ahstack->ah_ksp = kstat_create_netstack("ipsecah", 0, "ah_stat", "net",
 176      -            KSTAT_TYPE_NAMED, sizeof (ah_kstats_t) / sizeof (kstat_named_t),
 177      -            KSTAT_FLAG_PERSISTENT, stackid);
      177 +            KSTAT_TYPE_NAMED, sizeof (ah_kstats_t) / sizeof (kstat_named_t), 0,
      178 +            stackid);
 178  179  
 179  180          if (ahstack->ah_ksp == NULL || ahstack->ah_ksp->ks_data == NULL)
 180  181                  return (B_FALSE);
 181  182  
 182  183          ahstack->ah_kstats = ahstack->ah_ksp->ks_data;
 183  184  
 184  185          ahstack->ah_ksp->ks_update = ah_kstat_update;
 185  186          ahstack->ah_ksp->ks_private = (void *)(uintptr_t)stackid;
 186  187  
 187  188  #define K64 KSTAT_DATA_UINT64
↓ open down ↓ 3655 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX