Descriptor Rings
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 77
Receive Rings
The Ethernet controllers support two types of Receive Descriptor Rings: Producer Rings and Return Rings (see
). Unlike previous NetXtreme controllers, the BCM5718 family adds a second Receive Producer ring
dedicated to jumbo frame reception. Descriptors in the Producer Rings point to free buffers in the host. When
the controller receives a packet and consumes a receive buffer, the controller will modify and write back the
descriptor for the consumed buffer into the given Receive Return Ring. Basically the Producer Rings contain
descriptors that point to buffers that the controller is free to use, whereas the Return Rings contain descriptors
that the device has used and await processing from host software.
Figure 13: Receive Return Ring Memory Architecture Diagram
Receive Producer Ring
The receive producer ring resides in the host and points to empty host receive buffers that will later be filled with
received packet data. The controller will internally cache a copy of the producer ring. When the host software
driver has a free host receive packet buffer available for incoming packets, it will fill out a receive buffer
descriptor and have that descriptor point to the available buffer. Host software will then update the producer
index for that receive producer ring to indicate to the controller that there is a newly available receive buffer. After
the controller fetches and caches (e.g., consumes) this receive producer descriptor, the controller will update
the consumer index of the receive producer ring.
Host Memory
1-(64K-1) Bytes
Host Buffer
RX BD
Host Address
index
type
ip chksum
error flag
reserved
opaque
Receive Buffer Descriptor
len
flags
tcp_udp_chsum
vlan tag
Ring Control Block
1st
Host Ring Address
max_len
NIC Ring Address
flags
Receive Ring #1
Receive Ring #4
1st
Prod
Cons
RCB #1
RCB #4
Status Word
unused
RX Prod #1
RX std cons
RX Prod #2
Unused
Status Block
Unused
Unused
TX Cons
RX Prod #4
Con
Prod
Mailbox Registers
RX Cons #1
RX Cons #2
RX Cons #4
Note:
The receive return rings are stored in host memory.
Status Block (80 bytes)
Status block resides in the NIC memory
space and is periodically DMA'd to the
host based on the host coalescing Timer.
The NIC is the Producer of the receive return ring. It
increments the internal producer index to add
elements to the ring.
RX Prod #3
RX Cons #4