Introduction

Feature Set N-ANL9

Platform
Napatech SmartNIC
Content Type
Feature Description
Capture Software Version
N-ANL9

Filters control how frames are processed and captured.

The frame processing pipeline

This figure shows the functional blocks in the frame processing pipeline.


Packet Processing 4GA Rectangle.17 Color Color Rectangle.2 Slicing Slicing Rectangle.4 Packet Descriptor Packet Descriptor Rectangle.5 Queue Manager Queue Manager Rectangle.6 Hashing Hashing Rectangle.7 Stream Stream Rectangle.8 Stream Stream Rectangle.9 Stream Stream Rectangle.10 Stream Stream Rectangle.11 Stream Stream Dynamic connector Dynamic connector.12 Dynamic connector.13 Dynamic connector.14 Dynamic connector.15 Dynamic connector.16 Dynamic connector.17 Dynamic connector.18 Dynamic connector.19 Dynamic connector.20 Box callout Recipe Recipe Box callout.22 Recipe Recipe Box callout.23 Recipe Recipe Box callout.24 Recipe Recipe Box callout.25 Recipe Recipe

The frame passes through a number of functional blocks. Each block is controlled by a recipe. For example, the Color block can contribute to the "color" value of the frame, the Slicing block can cut out parts of the frame, and the Packet Descriptor block will attach a packet descriptor with relevant information about the frame. The last functional block, the Queue Manager, decides which stream will receive the frame.

The recipes are specified by filters, described below. If no filters are defined, all functional blocks will execute their default recipe. For example, the default recipe for the Queue Manager will drop the frames.

Filters

Each filter consists of a filter expression and a number of recipes.

A filter expression is a combination of protocol, IP match, port and various other tests.

The recipes correspond to the functional blocks:
  • Color assignment
  • Hash key calculation
  • IP fragment handling
  • Slicing
  • Packet descriptor building
  • Distribution to streams (queue management)
Filters 4GA Rectangle.17 Filter expression Filter expression Rectangle.2 Color recipe Color recipe Rectangle.3 Hashing recipe Hashing recipe Rectangle.17.4 Filter 1 Filter 1 Rectangle.7 Filter expression Filter expression Rectangle.8 Color recipe Color recipe Rectangle.10 Filter 2 Filter 2 Rectangle.12 Filter expression Filter expression Rectangle.13 Slicing recipe Slicing recipe Rectangle.14 Stream recipe Stream recipe Rectangle.15 Filter 3 Filter 3 Rectangle.17.17 Filter expression Filter expression Rectangle.18 Color recipe Color recipe Rectangle.19 Stream recipe Stream recipe Rectangle.20 Filter 4 Filter 4
  1. When a frame is received, all functional blocks are reset to their default recipe.

  2. The frame is then presented to each filter in reverse priority order (the filter with the lowest priority is consulted first). If the frame matches the filter expression, the associated recipes are copied to the relevant functional blocks, replacing the recipes already there. This way, a higher priority filter overrules the behavior specified by a lower priority filter.

  3. When all filters have been consulted, the frame is run through the functional blocks.

In effect, each resulting function recipe (including distribution to streams) can be picked from a different filter.

Filter example

Filters are specified using the Assign NTPL command. Each Assign command specifies a new filter. Recipes are specified as options to the Assign commands.

In the following example, frames with length greater than or equal to 1000 bytes are processed using recipes from two different filters.

Assign[StreamId = 1; Priority = 20; Slice = Layer4Header[008]] = Length >= 300
Assign[StreamId = 2; Priority = 10] = Length >= 1000

Filter 1 matches all frames with length greater than or equal to 300 bytes. Filter 2 matches all frames with length greater than or equal to 1000 bytes. Suppose a frame with a length of 1000 bytes is received. Both filters will match with filter 2 having the highest priority. Because filter 2 has the highest priority and it defines a StreamId recipe, the frame will be sent to stream 2. Filter 2 does not define a Slice recipe; however filter 1 does, and because it is the next highest priority filter that also matches the frame, the frame is sliced according to filter 1's Slice recipe.