Print this page
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ilb/ilb.c
          +++ new/usr/src/uts/common/inet/ilb/ilb.c
↓ open down ↓ 170 lines elided ↑ open up ↑
 171  171   */
 172  172  #define ILB_G_KS_NAME           "global"
 173  173  #define ILB_G_KS_CNAME          "kstat"
 174  174  #define ILB_RULE_KS_CNAME       "rulestat"
 175  175  
 176  176  static kstat_t *
 177  177  ilb_kstat_g_init(netstackid_t stackid, ilb_stack_t *ilbs)
 178  178  {
 179  179          kstat_t *ksp;
 180  180          ilb_g_kstat_t template = {
 181      -                { "num_rules",          KSTAT_DATA_UINT64, 0 },
 182      -                { "ip_frag_in",         KSTAT_DATA_UINT64, 0 },
 183      -                { "ip_frag_dropped",    KSTAT_DATA_UINT64, 0 }
      181 +                { "num_rules",          KSTAT_DATA_UINT64, {{0}} },
      182 +                { "ip_frag_in",         KSTAT_DATA_UINT64, {{0}} },
      183 +                { "ip_frag_dropped",    KSTAT_DATA_UINT64, {{0}} }
 184  184          };
 185  185  
 186  186          ksp = kstat_create_netstack(ILB_KSTAT_MOD_NAME, 0, ILB_G_KS_NAME,
 187  187              ILB_G_KS_CNAME, KSTAT_TYPE_NAMED, NUM_OF_FIELDS(ilb_g_kstat_t),
 188  188              KSTAT_FLAG_VIRTUAL, stackid);
 189  189          if (ksp == NULL)
 190  190                  return (NULL);
 191  191          bcopy(&template, ilbs->ilbs_kstat, sizeof (template));
 192  192          ksp->ks_data = ilbs->ilbs_kstat;
 193  193          ksp->ks_private = (void *)(uintptr_t)stackid;
↓ open down ↓ 11 lines elided ↑ open up ↑
 205  205                  kstat_delete_netstack(ilbs->ilbs_ksp, stackid);
 206  206                  ilbs->ilbs_ksp = NULL;
 207  207          }
 208  208  }
 209  209  
 210  210  static kstat_t *
 211  211  ilb_rule_kstat_init(netstackid_t stackid, ilb_rule_t *rule)
 212  212  {
 213  213          kstat_t *ksp;
 214  214          ilb_rule_kstat_t template = {
 215      -                { "num_servers",                KSTAT_DATA_UINT64, 0 },
 216      -                { "bytes_not_processed",        KSTAT_DATA_UINT64, 0 },
 217      -                { "pkt_not_processed",          KSTAT_DATA_UINT64, 0 },
 218      -                { "bytes_dropped",              KSTAT_DATA_UINT64, 0 },
 219      -                { "pkt_dropped",                KSTAT_DATA_UINT64, 0 },
 220      -                { "nomem_bytes_dropped",        KSTAT_DATA_UINT64, 0 },
 221      -                { "nomem_pkt_dropped",          KSTAT_DATA_UINT64, 0 },
 222      -                { "noport_bytes_dropped",       KSTAT_DATA_UINT64, 0 },
 223      -                { "noport_pkt_dropped",         KSTAT_DATA_UINT64, 0 },
 224      -                { "icmp_echo_processed",        KSTAT_DATA_UINT64, 0 },
 225      -                { "icmp_dropped",               KSTAT_DATA_UINT64, 0 },
 226      -                { "icmp_too_big_processed",     KSTAT_DATA_UINT64, 0 },
 227      -                { "icmp_too_big_dropped",       KSTAT_DATA_UINT64, 0 }
      215 +                { "num_servers",                KSTAT_DATA_UINT64, {{0}} },
      216 +                { "bytes_not_processed",        KSTAT_DATA_UINT64, {{0}} },
      217 +                { "pkt_not_processed",          KSTAT_DATA_UINT64, {{0}} },
      218 +                { "bytes_dropped",              KSTAT_DATA_UINT64, {{0}} },
      219 +                { "pkt_dropped",                KSTAT_DATA_UINT64, {{0}} },
      220 +                { "nomem_bytes_dropped",        KSTAT_DATA_UINT64, {{0}} },
      221 +                { "nomem_pkt_dropped",          KSTAT_DATA_UINT64, {{0}} },
      222 +                { "noport_bytes_dropped",       KSTAT_DATA_UINT64, {{0}} },
      223 +                { "noport_pkt_dropped",         KSTAT_DATA_UINT64, {{0}} },
      224 +                { "icmp_echo_processed",        KSTAT_DATA_UINT64, {{0}} },
      225 +                { "icmp_dropped",               KSTAT_DATA_UINT64, {{0}} },
      226 +                { "icmp_too_big_processed",     KSTAT_DATA_UINT64, {{0}} },
      227 +                { "icmp_too_big_dropped",       KSTAT_DATA_UINT64, {{0}} }
 228  228          };
 229  229  
 230  230          ksp = kstat_create_netstack(ILB_KSTAT_MOD_NAME, rule->ir_ks_instance,
 231  231              rule->ir_name, ILB_RULE_KS_CNAME, KSTAT_TYPE_NAMED,
 232  232              NUM_OF_FIELDS(ilb_rule_kstat_t), KSTAT_FLAG_VIRTUAL, stackid);
 233  233          if (ksp == NULL)
 234  234                  return (NULL);
 235  235  
 236  236          bcopy(&template, &rule->ir_kstat, sizeof (template));
 237  237          ksp->ks_data = &rule->ir_kstat;
↓ open down ↓ 2 lines elided ↑ open up ↑
 240  240          kstat_install(ksp);
 241  241          return (ksp);
 242  242  }
 243  243  
 244  244  static kstat_t *
 245  245  ilb_server_kstat_init(netstackid_t stackid, ilb_rule_t *rule,
 246  246      ilb_server_t *server)
 247  247  {
 248  248          kstat_t *ksp;
 249  249          ilb_server_kstat_t template = {
 250      -                { "bytes_processed",    KSTAT_DATA_UINT64, 0 },
 251      -                { "pkt_processed",      KSTAT_DATA_UINT64, 0 },
 252      -                { "ip_address",         KSTAT_DATA_STRING, 0 }
      250 +                { "bytes_processed",    KSTAT_DATA_UINT64, {{0}} },
      251 +                { "pkt_processed",      KSTAT_DATA_UINT64, {{0}} },
      252 +                { "ip_address",         KSTAT_DATA_STRING, {{0}} }
 253  253          };
 254  254          char cname_buf[KSTAT_STRLEN];
 255  255  
 256  256          /* 7 is "-sstat" */
 257  257          ASSERT(strlen(rule->ir_name) + 7 < KSTAT_STRLEN);
 258  258          (void) sprintf(cname_buf, "%s-sstat", rule->ir_name);
 259  259          ksp = kstat_create_netstack(ILB_KSTAT_MOD_NAME, rule->ir_ks_instance,
 260  260              server->iser_name, cname_buf, KSTAT_TYPE_NAMED,
 261  261              NUM_OF_FIELDS(ilb_server_kstat_t), KSTAT_FLAG_VIRTUAL, stackid);
 262  262          if (ksp == NULL)
↓ open down ↓ 1895 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX