Print this page
11490 SRS ring polling disabled for VLANs
11491 Want DLS bypass for VLAN traffic
11492 add VLVF bypass to ixgbe core
2869 duplicate packets with vnics over aggrs
11489 DLS stat delete and aggr kstat can deadlock
Portions contributed by: Theo Schlossnagle <jesus@omniti.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/vnic/vnic_dev.c
          +++ new/usr/src/uts/common/io/vnic/vnic_dev.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  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) 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright 2015 Joyent, Inc.
       23 + * Copyright 2018 Joyent, Inc.
  24   24   * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
  25   25   */
  26   26  
  27   27  #include <sys/types.h>
  28   28  #include <sys/cred.h>
  29   29  #include <sys/sysmacros.h>
  30   30  #include <sys/conf.h>
  31   31  #include <sys/cmn_err.h>
  32   32  #include <sys/list.h>
  33   33  #include <sys/ksynch.h>
↓ open down ↓ 313 lines elided ↑ open up ↑
 347  347          int err;
 348  348          boolean_t is_anchor = ((flags & VNIC_IOC_CREATE_ANCHOR) != 0);
 349  349          char vnic_name[MAXNAMELEN];
 350  350          const mac_info_t *minfop;
 351  351          uint32_t req_hwgrp_flag = B_FALSE;
 352  352  
 353  353          *diag = VNIC_IOC_DIAG_NONE;
 354  354  
 355  355          rw_enter(&vnic_lock, RW_WRITER);
 356  356  
 357      -        /* does a VNIC with the same id already exist? */
      357 +        /* Does a VNIC with the same id already exist? */
 358  358          err = mod_hash_find(vnic_hash, VNIC_HASH_KEY(vnic_id),
 359  359              (mod_hash_val_t *)&vnic);
 360  360          if (err == 0) {
 361  361                  rw_exit(&vnic_lock);
 362  362                  return (EEXIST);
 363  363          }
 364  364  
 365  365          vnic = kmem_cache_alloc(vnic_cache, KM_NOSLEEP);
 366  366          if (vnic == NULL) {
 367  367                  rw_exit(&vnic_lock);
↓ open down ↓ 662 lines elided ↑ open up ↑
1030 1030  }
1031 1031  
1032 1032  /*
1033 1033   * Callback functions for set/get of properties
1034 1034   */
1035 1035  /*ARGSUSED*/
1036 1036  static int
1037 1037  vnic_m_setprop(void *m_driver, const char *pr_name, mac_prop_id_t pr_num,
1038 1038      uint_t pr_valsize, const void *pr_val)
1039 1039  {
1040      -        int             err = 0;
     1040 +        int             err = 0;
1041 1041          vnic_t          *vn = m_driver;
1042 1042  
1043 1043          switch (pr_num) {
1044 1044          case MAC_PROP_MTU: {
1045 1045                  uint32_t        mtu;
1046 1046  
1047 1047                  if (pr_valsize < sizeof (mtu)) {
1048 1048                          err = EINVAL;
1049 1049                          break;
1050 1050                  }
↓ open down ↓ 77 lines elided ↑ open up ↑
1128 1128          }
1129 1129          return (err);
1130 1130  }
1131 1131  
1132 1132  /* ARGSUSED */
1133 1133  static int
1134 1134  vnic_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
1135 1135      uint_t pr_valsize, void *pr_val)
1136 1136  {
1137 1137          vnic_t          *vn = arg;
1138      -        int             ret = 0;
     1138 +        int             ret = 0;
1139 1139          boolean_t       out;
1140 1140  
1141 1141          switch (pr_num) {
1142 1142          case MAC_PROP_VN_PROMISC_FILTERED:
1143 1143                  out = mac_get_promisc_filtered(vn->vn_mch);
1144 1144                  ASSERT(pr_valsize >= sizeof (boolean_t));
1145 1145                  bcopy(&out, pr_val, sizeof (boolean_t));
1146 1146                  break;
1147 1147          case MAC_PROP_SECONDARY_ADDRS:
1148 1148                  ret = vnic_get_secondary_macs(vn, pr_valsize, pr_val);
↓ open down ↓ 159 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX