
GREEN
PLB 2224
Operational Description
Data Sheet
78
2002-06-03
5.4
Packet Classification
The packet classification and filtering feature enables the PLB 2224 to identify patterns
within the first 64 B of packet data and take a specific action if a match is found. Packet
filtering allows identification of packets such as protocol type (i.e., an IP packet), TOS
values within a certain range of the IP packet, and IGMP control packet. Once a packet
is classified, one of the following actions can be taken:
Increment a dedicated counter for management purposes,
Forward the packet to a port designated for forwarding such packets. Typically the
forwarding port is a CPU port, but it could also be some other port,
Discard the packet, i.e., do not forward it to the normal destination port(s),
Monitor the packet, i.e., forward it to the monitoring port,
Assign HIGH priority to the packet.
The data pattern(s) used for identification and handling actions are configured globally
and are shared by all ports on the PLB 2224.
Figure 15
shows how packet filtering is
accomplished.
Several registers are used to implement packet classification and filtering. They are
described in
Chapter 7
. These configuration registers are mapped into the CPU address
space and can be loaded using the CPU interface.
The packet identification is done with the help of four groups of pattern registers. The
groups are identified as Group #0 through #3, and pattern sets within a group are
identified as pattern #0 through #3. Out of the 4 groups, pattern registers in group #0 and
#1 are user configurable, while in group #2 and #3 they are hard coded to identify IP
protocol packets in 802.3 SNAP and Ethernet II frame formats respectively. Groups #0
and #1 each consist of 4 pattern sets. Each set has a 16-bit pattern value, a 16-bit mask,
5-bit offset, and a flag for the type of comparison (LE or EQ).
When a packet is received by a port on the PLB 2224, the two bytes with the starting half-
word (==2-bytes) address of offset[5:1] within the packet are compared with the data
stored in pattern[15:0], and a match signal is generated when the results of the
comparison are true. In doing the comparison, the pattern[15:0] is qualified by the
corresponding mask[15:0]. A 1 at any position in the mask implies that the corresponding
bit in the Ethernet packet and the pattern register are not being compared (i.e., they are
considered matched).
The first pattern set (i.e., pattern set #0) in each group can be programmed to generate
a match when the packet data is less than or equal to (LE) the pattern data. Setting the
corresponding comp_le0 bit to a 1 does this. The other three pattern sets can only check
if the Ethernet packet data is equal to the pattern. Thus, groups #0 and #1 generate four
match signals each, called match0 through match3
1
2
Number of multicast packets
Number of packets dropped