Send Rings
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 108
Host-Based Send Ring
The send buffer descriptors of host based send ring reside in host memory.
The host-based send ring will have up to 512 buffer descriptors, which are periodically and transparently DMAed
to a staging area inside the NIC internal memory where they are waiting to be consumed. The staging area can
hold up to 128 entries per-ring, and Ethernet controller tries to keep the staging area full at all times by constantly
monitoring the consumer and producer index (the algorithm for accomplishing this is beyond the scope of this
manual). The staging areas are located at a starting offset 0x4000 of NIC memory.
illustrates the
relationship between the send buffer descriptors in host memory and the staging area in NIC memory.
When the host software initializes new buffer descriptors, its send ring producer index is incremented by the
number of descriptors. The new index is then written to the corresponding send ring host producer index mailbox
register starting at offset 0x300 for host standard (see
“Send BD Ring Host Producer Index Register (offset:
), which may trigger the Ethernet controller to DMA the descriptors to its staging
area. Eventually, the buffer descriptors are processed, and the data associated with these descriptors is
transferred onto the network.
Figure 21: Relationship Between Send Buffer Descriptors
The Ethernet controller maintains the send ring consumer index, which is incremented as it processes the
descriptors. The Ethernet controller informs the host software of its progress by updating the send ring
consumer index in the status block. The host software uses the send ring consumer index and its producer index
to determine the empty slots in the ring. The Ethernet controller implements an algorithm that periodically DMAs
the status block to host memory in an efficient manner.
Send BD 1
Send BD 2
Send BD 3
Send BD 4
Send BD 5
Send BD 7
Send BD 8
..
.
Send BD 6
Send BD 512
Send BD 1
Send BD 128
...
..
.
Send Buffer Descriptors in
Host Memory
Send Buffer Descriptors in
NIC Memory
Producer
Consumer
Send BD n+2
Send BD n
Send BD n+1
DMA