Receive Return Rings
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 95
Receive Rules Setup and Frame Classification
The Ethernet controller has a feature that allows for the classification of receive packets based on a set of rules.
The rules are determined by the host software and then input into the Ethernet controller.
A packet can be accepted or rejected based on the rules initialized into two rules register areas. The packets
can also be classified into groups of packets of higher to lower priority using the rules registers. This occurs
when the packet is directed to a specific return ring. Return rings 1–4 have an inherent priority associated with
them. The priority is from lowest ring number to highest ring number; return ring 1 being the highest priority ring
and return ring 4 being the lowest. The implementation of priority class is based on how many rings the host
software has initialized and made available to the Ethernet controller. As packets arrive, the Ethernet controller
may classify each packet based on the rules. When the host services the receive packet, it can service the lower
numbered rings first.
A rule can be changed by first disabling it by setting 0 into Enable bit (bit 31) in Receive BD Rules Control
register (see
). Wait about 20 receive clocks (rx_clock) and then reenable it when it is
programmed with a new rule. Otherwise, changing the rules dynamically during runtime may cause the rule
checker to output erroneous results because the rule checker is a pipelined design and uses the various fields
of the rules at different clock cycles.
Receive Rules Configuration Register
The Receive Rules Configuration register (memory offset 0x500–0x503, see
) uses bits 3:7 to specify
the ring where a received packet should be placed into if no rules are met, or if the rules have not been set up.
A value of 0 means the received packet will be discarded. A value of 1–16 specifies a corresponding ring. This
ring should be initialized to at least a value of 1 if the rules are not being used to ensure that all received packets
will be DMAed to return ring 1.
Table 21: Receive Rules Configuration Register
Bits
Field
Access
31:8
Reserved
RO
7:3
Specifies the default class (ring) if no rules are matched
RW
2:0
Reserved
RO