BCM5722
R
R
ECEIVE
ETURN
Receive Return Rings (RR) are host-based memory blocks that are used by host software to keep track of the where the
BCM5722 Ethernet controller is putting the received packets related receive buffer descriptors. Unlike the producer rings,
the return rings reside only in host memory. The BCM5722 Ethernet controller uses the BDs in the NIC's memory that are
previously copied from the producer rings to use when packets are received from the LAN. It places the BDs that correspond
to received packets in the return rings.
Return rings are the exact opposite of producer rings, except that they are not categorized by the maximum length receive
packets supported. They are actually categorized by priority or class of received packet. The highest priority return ring is
ring 1, and the lowest priority is the last ring (Return Ring 2–Return Ring 4 depending on how many rings are set up by the
host software). The Receive Return Ring is configurable to a value of either 32 or 64 or 128 or 256 or 512.
The Receive Return Ring RCBs are used to set up return rings in much the same way the Receive Producer Ring RCB is
used to set up the receive producer ring. These RCBs for the return rings are set in the Miscellaneous memory region
(SSRAM) at offset 0x200 (this region should not be confused with the register space in the chip). The RCB max_len field is
used to indicate the number of buffer descriptor entries in a return ring. If an invalid value is set, the BCM5722 Ethernet
controller indicates an attention error in the Flow Attention register.
M
R
ANAGEMENT OF
The return rings are managed by the host using the Mailbox registers and status block.
When a packet is received from the LAN, the BCM5722 Ethernet controller DMAs the packet to a location in the host, and
then DMAs the related BD to a return ring. As the producer of this packet to the host, the BCM5722 Ethernet controller
updates the status block producer indices for the related return ring (i.e., return ring 1 to return ring 4 that was DMAed the
BD received packet). These return ring indices can then be read by the host software to determine the last BD index value
of a particular ring that has information of the last received packet.
As the consumer of the received packet, the host software must update the return ring consumer indices in Mailbox registers
Receive BD Return Ring 1 Consumer Index (memory offset 0x280–0x287 for host standard and flat modes and
0x5880–0x5887 for indirect mode) through Receive BD Return Ring 4 Consumer Index.
H
B
A
OST
UFFER
LLOCATION
The allocation of memory in the host is dependent on the operating system in which the controller is being used. Two things
to remember are:
The use of non-cached and physically contiguous memory is best for adapter performance.
•
•
Physical memory mapping is needed for the controller's internal copies of logical host memory.
Page 65
Receive Return Rings
R
INGS
R
M
ETURN
INGS WITH
Bro adco m C orp or atio n
Figure 23 on page 48
R
AILBOX
EGISTERS AND
Programmer's Guide
shows receive return rings.
S
B
TATUS
LOCK
Document 5722-PG101-R
10/15/07
Need help?
Do you have a question about the BCM5722 and is the answer not in the manual?