Print this page
10472 Limit number of multicast NCEs
Reviewed by: Cody Peter Mello <melloc@writev.io>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip_stack.h
          +++ new/usr/src/uts/common/inet/ip_stack.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
       27 +/*
       28 + * Copyright 2019 Joyent, Inc.
       29 + */
       30 +
  27   31  #ifndef _INET_IP_STACK_H
  28   32  #define _INET_IP_STACK_H
  29   33  
  30   34  #ifdef  __cplusplus
  31   35  extern "C" {
  32   36  #endif
  33   37  
  34   38  #include <sys/netstack.h>
  35   39  #include <netinet/igmp_var.h>
  36   40  #include <sys/modhash.h>
↓ open down ↓ 20 lines elided ↑ open up ↑
  57   61          kstat_named_t   ipsec_proto_ahesp;
  58   62          kstat_named_t   ip_conn_flputbq;
  59   63          kstat_named_t   ip_conn_walk_drain;
  60   64          kstat_named_t   ip_out_sw_cksum;
  61   65          kstat_named_t   ip_out_sw_cksum_bytes;
  62   66          kstat_named_t   ip_in_sw_cksum;
  63   67          kstat_named_t   ip_ire_reclaim_calls;
  64   68          kstat_named_t   ip_ire_reclaim_deleted;
  65   69          kstat_named_t   ip_nce_reclaim_calls;
  66   70          kstat_named_t   ip_nce_reclaim_deleted;
       71 +        kstat_named_t   ip_nce_mcast_reclaim_calls;
       72 +        kstat_named_t   ip_nce_mcast_reclaim_deleted;
       73 +        kstat_named_t   ip_nce_mcast_reclaim_tqfail;
  67   74          kstat_named_t   ip_dce_reclaim_calls;
  68   75          kstat_named_t   ip_dce_reclaim_deleted;
  69   76          kstat_named_t   ip_tcp_in_full_hw_cksum_err;
  70   77          kstat_named_t   ip_tcp_in_part_hw_cksum_err;
  71   78          kstat_named_t   ip_tcp_in_sw_cksum_err;
  72   79          kstat_named_t   ip_udp_in_full_hw_cksum_err;
  73   80          kstat_named_t   ip_udp_in_part_hw_cksum_err;
  74   81          kstat_named_t   ip_udp_in_sw_cksum_err;
  75   82          kstat_named_t   conn_in_recvdstaddr;
  76   83          kstat_named_t   conn_in_recvopts;
↓ open down ↓ 59 lines elided ↑ open up ↑
 136  143  } srcid_map_t;
 137  144  
 138  145  /*
 139  146   * IP stack instances
 140  147   */
 141  148  struct ip_stack {
 142  149          netstack_t      *ips_netstack;  /* Common netstack */
 143  150  
 144  151          uint_t                  ips_src_generation;     /* Both IPv4 and IPv6 */
 145  152  
 146      -        struct mod_prop_info_s  *ips_propinfo_tbl;      /* ip tunables table */
      153 +        struct mod_prop_info_s  *ips_propinfo_tbl;      /* ip tunables table */
 147  154  
 148  155          mib2_ipIfStatsEntry_t   ips_ip_mib;     /* SNMP fixed size info */
 149  156          mib2_icmp_t     ips_icmp_mib;
 150  157          /*
 151  158           * IPv6 mibs when the interface (ill) is not known.
 152  159           * When the ill is known the per-interface mib in the ill is used.
 153  160           */
 154  161          mib2_ipIfStatsEntry_t   ips_ip6_mib;
 155  162          mib2_ipv6IfIcmpEntry_t  ips_icmp6_mib;
 156  163  
↓ open down ↓ 36 lines elided ↑ open up ↑
 193  200          uint_t          ips_ipcl_conn_fanout_size;
 194  201          uint_t          ips_ipcl_bind_fanout_size;
 195  202          uint_t          ips_ipcl_udp_fanout_size;
 196  203          uint_t          ips_ipcl_raw_fanout_size;
 197  204          uint_t          ips_ipcl_iptun_fanout_size;
 198  205          struct connf_s  *ips_ipcl_globalhash_fanout;
 199  206          int             ips_conn_g_index;
 200  207  
 201  208  /* ip.c */
 202  209          /* Following protected by igmp_timer_lock */
 203      -        int             ips_igmp_time_to_next;  /* Time since last timeout */
 204      -        int             ips_igmp_timer_scheduled_last;
      210 +        int             ips_igmp_time_to_next;  /* Time since last timeout */
      211 +        int             ips_igmp_timer_scheduled_last;
 205  212          int             ips_igmp_deferred_next;
 206  213          timeout_id_t    ips_igmp_timeout_id;
 207  214          boolean_t       ips_igmp_timer_setter_active;
 208  215          boolean_t       ips_igmp_timer_quiesce;
 209  216  
 210  217          /* Following protected by mld_timer_lock */
 211      -        int             ips_mld_time_to_next;   /* Time since last timeout */
 212      -        int             ips_mld_timer_scheduled_last;
      218 +        int             ips_mld_time_to_next;   /* Time since last timeout */
      219 +        int             ips_mld_timer_scheduled_last;
 213  220          int             ips_mld_deferred_next;
 214  221          timeout_id_t    ips_mld_timeout_id;
 215  222          boolean_t       ips_mld_timer_setter_active;
 216  223          boolean_t       ips_mld_timer_quiesce;
 217  224  
 218  225          /* Protected by igmp_slowtimeout_lock */
 219  226          timeout_id_t    ips_igmp_slowtimeout_id;
 220  227          kmutex_t        ips_igmp_slowtimeout_lock;
 221  228          boolean_t       ips_igmp_slowtimeout_quiesce;
 222  229  
↓ open down ↓ 17 lines elided ↑ open up ↑
 240  247  
 241  248          /*
 242  249           * This is the IPv6 counterpart of RADIX_NODE_HEAD_LOCK. It is used
 243  250           * to prevent adds and deletes while we are doing a ftable_lookup
 244  251           * and extracting the ire_generation.
 245  252           */
 246  253          krwlock_t       ips_ip6_ire_head_lock;
 247  254  
 248  255          uint32_t        ips_ip6_ftable_hash_size;
 249  256  
 250      -        ire_stats_t     ips_ire_stats_v4;       /* IPv4 ire statistics */
 251      -        ire_stats_t     ips_ire_stats_v6;       /* IPv6 ire statistics */
      257 +        ire_stats_t     ips_ire_stats_v4;       /* IPv4 ire statistics */
      258 +        ire_stats_t     ips_ire_stats_v6;       /* IPv6 ire statistics */
 252  259  
 253  260          /* Count how many condemned objects for kmem_cache callbacks */
 254  261          uint32_t        ips_num_ire_condemned;
 255  262          uint32_t        ips_num_nce_condemned;
 256  263          uint32_t        ips_num_dce_condemned;
 257  264  
 258  265          struct ire_s    *ips_ire_reject_v4;     /* For unreachable dests */
 259  266          struct ire_s    *ips_ire_reject_v6;     /* For unreachable dests */
 260  267          struct ire_s    *ips_ire_blackhole_v4;  /* For temporary failures */
 261  268          struct ire_s    *ips_ire_blackhole_v6;  /* For temporary failures */
↓ open down ↓ 75 lines elided ↑ open up ↑
 337  344           * given a datagram's src ip address.
 338  345           */
 339  346          ipaddr_t        ips_last_encap_src;
 340  347          struct vif      *ips_last_encap_vif;
 341  348          kmutex_t        ips_last_encap_lock;    /* Protects the above */
 342  349  
 343  350          /*
 344  351           * reg_vif_num is protected by numvifs_mutex
 345  352           */
 346  353          /* Whether or not special PIM assert processing is enabled. */
 347      -        ushort_t        ips_reg_vif_num;        /* Index to Register vif */
      354 +        ushort_t        ips_reg_vif_num;        /* Index to Register vif */
 348  355          int             ips_pim_assert;
 349  356  
 350  357          union ill_g_head_u *ips_ill_g_heads;   /* ILL List Head */
 351  358  
 352  359          kstat_t         *ips_loopback_ksp;
 353  360  
 354  361          /* Array of conn drain lists */
 355  362          struct idl_tx_list_s    *ips_idl_tx_list;
 356  363          uint_t          ips_conn_drain_list_cnt; /* Count of conn_drain_list */
 357  364  
↓ open down ↓ 92 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX