Matching Process
177
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Rx Filters
Table 11-2. Possible Rules
Rule Layer
Field Name
MAC
Frame type
Frame subtype
BSSID
Source MAC address
Destination MAC address
Frame length
Payload value
LLC
Protocol type
IP
IP version
IP protocol
Source IP address
Destination IP address
ARP operation
ARP target IP address
Source port number
Destination port number
Payload value
lists all possible actions of a filter.
Table 11-3. Possible Actions
Action
Possible Values
Drop
Drop the frame and abort and processing on this frame.
Event
Send an asynchronous event to the host.
Counter
Increase or decrease counter value.
To perform a logical operation on filters such as logical OR or logical AND, create a special filter. This
combined filter node has two parent nodes (unlike a regular node, which has one parent node), and is
checked only if one or both (user-defined) of its parent nodes passed the match.
11.2.2 Tree Traversal
The filters are organized as a decision tree in layers. This structure enables the user to combine several
filters to identify a specific frame; the division to filter layers optimizes the traversal processing. For
example, three filters are required to detect a specific IP frame from a specific source MAC and a specific
word in the payload:
•
Filter 1: Specific source of the MAC address
•
Filter 2: The packet protocol type is IP.
•
Filter 3: The payload of the IP layer contains a specific word.
Filter 1 is the root, Filter 2 is a child of Filter 1, and Filter 3 is a child of Filter 2.
In this example, all of the filters are part of the same tree, but each filter is of a different layer. For every
received frame the device traverses through a series of decision trees that determine how the frame is
treated. The decision trees are composed of filter nodes. The tree traversal process starts with the root
nodes of the trees:
•
If a filter node passes the match, its actions are performed.
•
For drop action, the packet is dropped and the matching process for this frame stops. For any other
action, the frame matching process continues to its child nodes.
•
If the filter node does not pass the match, the match does not proceed to the child nodes; however, the
match process for this frame continues for other filter trees.
•
In any case, packets that were not dropped during the matching process continue with the other
(regular) network stack processing.