Transmit Data Flow
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 105
S e c t i o n 6 : Tr a n s m i t D a t a F l o w
Introduction
Send Buffer Descriptors (BDs) begin on the Send Producer rings. The device driver updates the Mailbox to
reflect available Send BDs.
• The MAC moves the available Send BDs to device local memory—a cache.
• Next, the MAC selects a BD from the internal cache using priority scheduling.
The physical address, programmed in the Send BD by the host device driver prior to the Mailbox update,
contains the host memory location of the TX packet buffer. The MAC reads the address from Send BD and
schedules a bus master DMA for reading the packet data from host buffer. The packet data will be moved into
device internal buffers from host buffers by Read DMA engine, and all the read buffers of 1 packet are chained
together into a cluster. This cluster is then sent to the transmit MAC which sends the packet data to the
integrated PHY for transmission on Ethernet media.
The write DMA engine will subsequently update the status block to indicate that the Send BD was consumed.
The host driver normally returns the packet buffers to the NOS/protocol so the next packet can reuse that host
physical memory. The send BD is now available for the next TX packet.
Send Rings
The send rings are shared data structures that are used to describe a series of data buffers that will be
transferred onto the network. The shared data structure is called the Ring Control Block (RCB), and the entries
within a ring for describing the data buffers are called the Send Buffer Descriptors (Send BDs).
Associated with each ring are two indices that control its operation. These indices are the producer index and
the consumer index, which are not shared between the host software and the Ethernet controller. In the case of
send rings, the host software controls the producer index by adding elements (initializing a Send BD) to the ring.
Similarly, the Ethernet controller controls the consumer index by removing elements (processing a Send BD)
from the ring.
The host software is responsible for maintaining its producer index and updating it by writing to the send ring
producer index mailbox register. The mailbox registers are described in registers
Index Register (offset: 0x5900)” on page 462
through
“Send BD Ring Host Producer Index Register (offset:
. The update actually triggers the Ethernet controller to process the send
descriptors starting at its consumer index. As a descriptor is processed, the consumer index is incremented, and
the new index is reflected in a new status block update. Status block is described in
Note:
The maximum number of Send BDs (buffer descriptors) for a single packet is (0.75)*(ring size).