summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/gld.h
diff options
context:
space:
mode:
authordg199075 <none@none>2006-09-19 11:16:27 -0700
committerdg199075 <none@none>2006-09-19 11:16:27 -0700
commit605445d5657096e69d948ccb554c9ff024fa34df (patch)
treec0acbb1d49d8259bf1a104d24f427270905e955c /usr/src/uts/common/sys/gld.h
parent8bc68872f6b178bf5e1d324c663e29fb6ccb1eab (diff)
downloadillumos-joyent-605445d5657096e69d948ccb554c9ff024fa34df.tar.gz
PSARC/2006/358 VLAN Observability Enhancement
4095699 snoop: add support for 802.1Q VLAN tagging 6292043 DL_PROMISC_SAP should see *all* traffic, not just untagged traffic on GLDv2 links 6306794 GLDv2 drivers incorrectly strip the VLAN tag in raw mode 6309233 GLDv3 drivers incorrectly process VLAN packets in raw mode 6375633 GLDv2 processes DL_PROMISC{ON,OFF}_REQ incorrectly 6425678 DL_PROMISC_SAP should make all VLAN traffic visible on physical GLDv3 links 6434082 Enhance snoop's VLAN filtering capability 6434130 i_dls_ether_header() doesn't generate VLAN header when priority is non-zero 6436003 QoS should be supported on non VLAN streams as well 6438679 GLDv3 doesn't respect QoS priorities in some cases 6442753 GLDv2/GLDv3 has several VLAN packet processing issues 6453746 Change definition of enprintf in pfmod.c 6457476 GLDv2 kstats are not MT-protected, could cause missing increment in some cases 6464397 mac_header_{cook,uncook}() failure can cause a message to be freed twice
Diffstat (limited to 'usr/src/uts/common/sys/gld.h')
-rw-r--r--usr/src/uts/common/sys/gld.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/usr/src/uts/common/sys/gld.h b/usr/src/uts/common/sys/gld.h
index e42bb62f28..3f3c01848e 100644
--- a/usr/src/uts/common/sys/gld.h
+++ b/usr/src/uts/common/sys/gld.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -344,21 +343,27 @@ extern int gld_rsrv(queue_t *);
/*
* Macros to construct a TCI or VTAG. The user must ensure values are in
- * range. In particular, VID 0 is not a valid argument to these constructor
- * macros; when the VID is 0 (VLAN_VID_NONE), the whole VTAG should be 0
- * (VLAN_VTAG_NONE), not 0x81000000.
+ * range. Note that in the special case of priority tag, VLAN_VID_NONE
+ * is also a valid argument to these constructor macros.
*/
#define GLD_MAKE_TCI(pri, cfi, vid) (((pri) << VLAN_PRI_SHIFT) | \
((cfi) << VLAN_CFI_SHIFT) | \
((vid) << VLAN_VID_SHIFT))
-#define GLD_MAKE_VTAG(tci) ((VLAN_TPID << VLAN_TPID_SHIFT) | (tci))
+#define GLD_MAKE_VTAG(pri, cfi, vid) \
+ (((uint32_t)ETHERTYPE_VLAN << VLAN_TPID_SHIFT) | \
+ ((pri) << VLAN_PRI_SHIFT) | \
+ ((cfi) << VLAN_CFI_SHIFT) | \
+ ((vid) << VLAN_VID_SHIFT))
+
+#define GLD_TCI2VTAG(tci) \
+ (((uint32_t)ETHERTYPE_VLAN << VLAN_TPID_SHIFT) | (tci))
/*
* Macros to construct a prototype TCI/VTAG and then convert it to a real one
*/
#define GLD_MK_PTCI(cfi, vid) GLD_MAKE_TCI(VLAN_PRI_MAX, cfi, vid)
-#define GLD_MK_PTAG(cfi, vid) GLD_MAKE_VTAG(GLD_MK_PTCI(cfi, vid))
+#define GLD_MK_PTAG(cfi, vid) GLD_MAKE_VTAG(VLAN_PRI_MAX, cfi, vid)
#define GLD_MK_PMSK(pri) (((pri) << VLAN_PRI_SHIFT) | ~VLAN_PRI_MASK)
#define GLD_MK_VTAG(ptag, pri) ((ptag) & GLD_MK_PMSK(pri))