Intel PCI User Manual

Page of 406
176
Software Developer’s Manual
802.1q VLAN Support
Table 9-2. 802.1q Tagged Frames
9.2
Transmitting and Receiving 802.1q Packets
Since the 802.1q tag is only four bytes, adding and stripping of tags can done completely in 
software. (For transmits, software inserts the tag into packet data before it builds the transmit 
descriptor list, and for receives, software strips the four byte tag from the packet data before 
delivering the packet to upper layer software.) 
However, because adding and stripping of tags in software results in more overhead for the host, 
the Ethernet controller has additional capabilities to add and strip tags in hardware, as discussed in 
the following two sections.
9.2.1
Adding 802.1q Tags on Transmits
Software can command the Ethernet controller to insert an 802.1q VLAN tag on a per packet basis. 
If CTRL.VME is set to 1b, and the VLE bit in the transmit descriptor is set to 1b, then the Ethernet 
controller inserts a VLAN tag into the packet that it transmits over the wire. The Tag Protocol 
Identifier (TPID) field of the 802.1q tag comes from the VLAN Ether Type (VET) register, and the 
Tag Control Information (TCI) of the 802.1q tag comes from the special field of the transmit 
descriptor (TDESC.SPECIAL).
9.2.2
Stripping 802.1q Tags on Receives
Software can instruct the Ethernet controller to strip 802.1q VLAN tags from received packets. If 
the CTRL.VME bit is set to 1b, and the incoming packet is an 802.1q VLAN packet (its Ethernet 
Type field matched the VET register), then the Ethernet controller strips the 4-byte VLAN tag from 
the packet, and stores the TCI in the Special field of the receive descriptor. 
The Ethernet controller also sets the VP bit in the receive descriptor to indicate that the packet had 
a VLAN tag that was stripped. If the CTRL.VME bit is not set, the 802.1q packets can still be 
received if they pass the receive filter. In this case, the VLAN tag is not stripped and the VP bit is 
not set. Refer to 
 for more information regarding receive packet filtering.
9.3
802.1q VLAN Packet Filtering
VLAN filtering is enabled by setting the RCTL.VFE bit to 1b. If enabled, hardware compares the 
type field of the incoming packet to a 16-bit field in the VLAN EtherType (VET) register. If the 
VLAN type field in the incoming packet matches the VET register, the 802.1q VLAN packet is 
then compared against the VLAN Filter Table Array (VFTA) for acceptance.
The Virtual LAN ID field indexes a 4096 bit vector. If the indexed bit in the vector is 1b, there is a 
Virtual LAN match. Software can set the entire bit vector to 1b’s if the node does not implement 
802.1q filtering.
Octet 1
Octet 2
UP
CFI
VID