Receive Data Flow
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 88
S e c t i o n 5 : R e c e i v e D a t a F l o w
Introduction
The RX MAC pulls BDs from RX producer rings. The RX BD specifies the location(s) in host memory where
packet data may be written.
shows the receive buffer descriptor cycle.
All ingress Ethernet frames are classified by the RX rules engine. A class ID is associated to each frame based
on QOS rules setup in the RX MAC (see
“Receive Rules Setup and Frame Classification” on page 95
). The
Receive List Placement and Receive List Initiator portions of the MAC architecture move BDs to the RX return
rings; the class ID associated to the packet is examined to route the BD to a specific RX return ring.
Once the packet is queued to the RX return ring, the device driver will wait for indication of the same through
the status block update and interrupt from the host coalescing engine. The host coalescing engine will update
the status block and generate a line interrupt or MSI (see
for further details
regarding interrupts) when a specified host coalescence criteria is met. Once the interrupt is generated, the host
device driver will service the interrupt. The ISR will determine if new BDs have been completed on the RX Return
Rings. Next, the device driver will indicate to the network protocol that the completed RX packets are available.
The network protocol will consume the packets and return physical buffers to the network driver at a later point.
The BDs may then be reused for new RX frames. The device driver must return the BD to an RX producer ring.
For this purpose, the driver should fill out either the opaque field or index field of the Rx BD when inserting/
initializing the BD in an RX Producer ring. When the BD is returned by the device through Return Ring, the
opaque or index data field of the BD will be used by the driver to identify the BD in Producer Ring that
corresponds to the Returned BD in Return Ring. The device driver will then reinitialize the identified BD in
Producer Ring with a new allocated buffer and replenish the Receive Producer Ring with this BD.