Filtering

Napatech Link-Capture™ Software Features

Platform
Napatech SmartNIC
Content Type
Feature Description
Capture Software Version
Link™ Capture Software 12.15

The filtering functionality is used to identify particular frames based on classification criteria and to define policies with multiple actions.

Supported filters

The following filters are supported in Napatech SmartNICs with Link-Capture™ Software.
  • Port filter using the received port information.
  • Protocol filter using the identified protocol information.
  • Error filter using the error information of FCS/IP/UDP/TCP checksum and other error conditions.
  • Length filter based on the full length or a part of the length in a frame.
  • Data filter based on user-defined fields.
  • Key match using various fields of a frame to be searched for in lists or ranges of values.
For more information on how to configure SmartNICs for filtering, see DN-0987.
Note: The key match test does not apply to the following SmartNICs.
  • NT400D11 SmartNICs running on the 2 × 100 Gbit/s flow management 1 image
  • NT400D11 SmartNICs running on the 2 × 40 Gbit/s flow management 1 image
  • NT400D11 SmartNICs running on the 8 × 25/10 Gbit/s flow management 1 image
  • NT200A02 SmartNICs running on the 2 × 100 Gbit/s flow management 1 image
  • NT200A02 SmartNICs running on the 2 × 40 Gbit/s flow management 1 image
  • NT200A02 SmartNICs running on the 8 × 10 Gbit/s flow management 1 image
  • NT100A01 SmartNICs running on the 4 × 25/10 Gbit/s flow management 1 image
  • NT100A01 SmartNICs running on the 4 × 10/1 Gbit/s flow management 1 image
  • NT40A11 SmartNICs running on the 4 × 10/1 Gbit/s capture/replay 2 image
  • NT40E3-4-PTP SmartNICs running on the capture/replay 2 image.

Configuring SmartNICs using NTPL

Filters and recipes are two key concepts used to configure how frames are filtered and processed by Napatech SmartNICs.
  • Filters: Define which frames are selected (the "what").
  • Recipes: Define what actions are performed on those frames (the "how").
Each Assign command consists of filter expressions and recipes as shown in the following example which configures the SmartNIC to slice all UDP frames to 64 bytes.
Figure. Recipes and filters in NTPL
Page-1 Sheet.45 Recipes Recipes Sheet.60 Filter Filter Sheet.64 Assign[StreamId = 1; Slice=StartOfFrame[64]] = Layer4Protocol... Assign[StreamId = 1; Slice=StartOfFrame[64]] = Layer4Protocol==UDP Sheet.70 [StreamId = 1; Slice=StartOfFrame[64]] [StreamId = 1; Slice=StartOfFrame[64]] Sheet.73 Layer4Protocol==UDP Layer4Protocol==UDP

In this NTPL example [StreamId = 1; Slice=StartOfFrame[64]] contains recipes, and Layer4Protocol==UDP is a filter expression.

A filter is a classification rule that identifies particular frames based on specific criteria, such as protocol type, port, error conditions, length or user-defined data fields and various other tests. Filters are expressed as logical conditions in NTPL and are used to select which frames should be subject to further processing or actions. For example, a filter could select all UDP frames as shown in the example - Layer4Protocol==UDP is the filter expression that matches all UDP frames.

A recipe defines the actions or processing steps to be applied to frames that match a filter. Recipes specify what should happen to the selected frames, such as which stream they should be delivered to, whether they should be sliced, colored, hashed or have a specific packet descriptor attached. Recipes are specified as parameters within the squared brackets in the Assign command, preceding the filter expression. In the example, [StreamId = 1; Slice=StartOfFrame[64]] are recipes: the frame is assigned to stream 1 and sliced to 64 bytes.

The recipes correspond to the functional blocks as follows:
  • Color assignment
  • Hash key calculation
  • Correlation key calculation
  • IP fragment handling
  • Local retransmission
  • Slicing
  • Header stripping
  • Packet masking
  • Packet descriptor building
  • Distribution to streams (queue management)
If the Assign command does not include any recipes, all functional blocks apply default actions as follows.
  • StreamId: 'DROP' (Packet is discarded)
  • Color: 0 (Zero)
  • Slice: No slicing
  • SliceReTx: No slicing
  • Hash: RoundRobin
  • Descriptor: As specified in the ntservice.ini file.