EasyManua.ls Logo

Broadcom BCM5722 - Figure 33: Scatter Gather of Frame Fragments

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...
Programmer’s Guide BCM5722
10/15/07
Broadcom Corporation
Document 5722-PG101-R Scatter/Gather Page 78
SCATTER/GATHER
Most often, the host software requests the NIC to transmit a frame that spans several physical fragments that are arbitrary
in size and buffer alignment. This requires the BCM5722 Ethernet controller to gather all these fragments during a DMA
process into a continuous data stream for transmission.
The ability to scatter/gather a frame lessens the restriction on the host software and increases overall system performance.
For example, a TCP/IP protocol stack could preconstruct the MAC and IP headers in separate buffers that are combined
with the payload to form a complete frame. Since the header data are fairly constant during a TCP or UDP session, the stack
could use the same header buffers for the next frame.
The BCM5722 Ethernet controller uses a buffer descriptor for describing a physical fragment. There are two types of buffer
descriptors; the Receive MAC processes receive buffer descriptors (Receive BD) and the Transmit MAC processes send
buffer descriptors (Send BD).
Figure 33 illustrates the relationship between a frame consisting of multiple fragments and their corresponding send buffer
descriptors.
Figure 33: Scatter Gather of Frame Fragments
To transmit a frame, the host software sets up consecutive buffer descriptors in a send ring. Each buffer descriptor describes
a physical fragment of a frame. As an example, the above figure illustrates a frame consisting of five fragments that are
scattered throughout host memory. Frag1, the first fragment, is at the start of the frame, and Frag5, the last fragment, is at
the end of a frame. For each fragment, there is a corresponding buffer descriptor, SendBd1 through SendBd5. These buffer
descriptors must be initialized in the send ring in a consecutive order, SendBd1 to SendBd5. The last send buffer descriptor
of a frame must have the PACKET_END bit of Send BD Flags field set to indicate the end of a frame.
Send BD 3
Frame Fragments
Frag 2
Frag 5
Frag 4
Frag 1
Send BD 1
Send BD 2
Send BD 4
Send BD 5
Frag 3
Send Buffer Descriptors
Buffers
Buffer 1
Buffer 2
Buffer 3
Buffer 4
Buffer 5
Tx FIFO Tx MAC
DMA

Table of Contents