EasyManua.ls Logo

Broadcom BCM5722 - Page 138

Broadcom BCM5722
593 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BCM5722 Programmer’s Guide
10/15/07
Broadcom Corporation
Page 79 VLAN Tag Insertion Document 5722-PG101-R
VLAN TAG INSERTION
The BCM5722 Ethernet controller is capable of inserting 802.1Q compliant VLAN tags into transmitted frames and extracting
the VLAN tags from received frames. A frame containing the 802.1Q VLAN tag has the value TPID (Tag Protocol Identifier)
value in the Ethertype field followed by a 16-bit TCI (Tag Control Information) field, which is made up of one CFI bit, 3 802.1P
priority bits, and a 12-bit VLAN ID. The original 16-bit Ethertype/Length field follows the TCI field.
Table 34 on page 69 shows the frame format with 802.1Q VLAN tag inserted.
The BCM5722 Ethernet controller allows the host software to enable or disable tag insertion on a per-packet basis. To send
a frame with a VLAN tag, the host software must initialize the first send buffer descriptor of a packet with the VLAN tag value
and set the VLAN_TAG bit of Send BD Flags field (see “Send Rings” on page 74).
TX DATA FLOW DIAGRAM
Figure 34 on page 80 illustrates how a frame, consisting of several fragments, is sent from the host to the NIC and onto the
network. For simplicity, the diagram depicts the operation of a single ring.
1. The host software calls a system API to retrieve the three physical fragments of the frame. It initializes the next three
send buffer descriptors to point to each fragment. The send buffer descriptors reside in host memory. Internally, the host
software maintains the ring’s producer index. In this case, the producer index is incremented by three because there
are three fragments.
2. The host software updates the send ring producer index by writing the producer index value to Send Ring Producer Index
Mailbox at offset 0x300 for host standard and flat modes and offset 0x5900 for indirect mode. The mailbox update
triggers the BCM5722 Ethernet controller to process the send buffer descriptors.
3. The send buffer descriptors are DMAed to the ring’s staging area in device memory as indicated in the RCB.
4. The BCM5722 Ethernet controller DMAs the frame (as described in the descriptors) to its internal memory for
transmission.
5. Internally, the BCM5722 Ethernet controller maintains the send ring’s consumer index, which is incremented as it
processes the descriptors.
6. The new consumer index is written to the status block in NIC memory (see “Status Block” on page 53).
7 The status block is DMAed to host memory. This DMA is subject to host coalescing, and the NIC may generate an inter-
rupt at this point.

Table of Contents