Information

Enhanced Three-Speed Ethernet Controllers
MPC8308 PowerQUICC II Pro Processor Reference Manual, Rev. 1
16-150 Freescale Semiconductor
16.6.4.2.5 Setting Up the Receive Queue Filer Table
The eTSEC frame parser always provides values for all properties, even where the relevant headers are not
available. In the latter case, the filer is given default properties that can be used to avoid conflict with
normal, defined property values. Accordingly, the rules in the filer table can be partitioned into rule sets
such that if all rules in a given set fail (due to headers being unavailable), lower priority rule sets can be
subsequently searched until either a rule set provides a match or a single default—catch-all—rule specifies
a definite receive queue. For example, an IEEE 802.1p priority rule set may be followed by an IP TOS rule
set, followed by a default rule; thus, if no VLAN tag appears in the received frame, the TOS rules are
checked, or the default is activated should no IP header be present.
The rule cluster feature is used to conditionalize evaluation of rule sets. Typically, this avoids evaluating
rules based on properties that may not be valid or relevant to the filing or filtering decision. For example,
TCP-related rules might be clustered behind a guard rule that checks that a TCP header has appeared and
the IP address matches our home address. Property 1—the parse flags property—is provided specifically
to check the characteristics of the received frame and the parser error status. The mask_register is typically
assigned beforehand to extract specific flags, in which case care should be taken that mask_register be
reassigned an appropriate mask vector for following comparisons.
In many cases it is possible to write the entire filer table before using eTSEC, as the rule set is static.
However, dynamic rule updates can be supported by pre-allocating partially instantiated rule sets, which
software rewrites as necessary. Rules that are not instantiated should be composed of empty entries, as
indicated in Table 16-139. In many cases empty entries can be overwritten by software without stopping
eTSEC’s receive function.
16.6.4.2.6 Filer Example—802.1p Priority Filing
This example, shown in Table 16-141, illustrates how to file frames according to layer 2 802.1p priority.
This matches against property 1001, comparing each specific priority level in order to associate them with
a RxBD ring index. Note that if a VLAN tag does not appear in the frame, the parser passes priority 0 to
the filer, which always matches the rule at entry 7 and terminate the table search.
Table 16-141. Filer Table Example—802.1p Priority Filing
Table
Entry
RQCTRL Fields
RQPROP Comment RQCTRL Word
CLE REJ AND Q CMP PID
0 0 0 0 000_000 00 1001 0x0000_0007 File priority 7 to ring 0 0x0000_0009
1 0 0 0 000_001 00 1001 0x0000_0006 File priority 6 to ring 1 0x0000_0409
2 0 0 0 000_010 00 1001 0x0000_0005 File priority 5 to ring 2 0x0000_0809
3 0 0 0 000_011 00 1001 0x0000_0004 File priority 4 to ring 3 0x0000_0C09
4 0 0 0 000_100 00 1001 0x0000_0003 File priority 3 to ring 4 0x0000_1009
5 0 0 0 000_101 00 1001 0x0000_0002 File priority 2 to ring 5 0x0000_1409