Managing the Life of a Flow

Stateful Flow Management

Platform
Napatech SmartNIC
Content Type
User Guide
Capture Software Version
Link™ Capture Software 12.8

This is a typical scenario of the flow management in the SmartNIC and the application.

Flow learning

The SmartNIC decodes every frame and looks up the flow in the flow table, taking actions based on the rules programmed by the application. The application controls the SmartNIC flow table as well as manages the host flow table which contains complete metadata of each flow. The following figure illustrates a typical scenario of the flow management in the SmartNIC and the application.


When a frame is received, the SmartNIC looks up the flow in the flow table and updates the flow information in table. The SmartNIC takes actions (for example drop or transmit) programmed by the application. If the flow is not found in the flow table, the frame is forwarded to the application for further processing. The application then looks up the flow and if the flow is still not found in the application flow table, the application performs flow learning.

  1. The flow manager looks up the flow in the flow table when a frame is received in the SmartNIC.
    1. Hit: If the flow is found in the SmartNIC flow table, the flow table is updated and actions are applied, for example, forward to a specific stream, transmit, drop etc.
    2. Miss: If the flow is not found in the SmartNIC flow table, the frame is forwarded to the host to be processed by the application.
  2. The application looks up the flow of the received frame.
    1. Hit: If the flow is found in the host flow table, actions are applied.
    2. Miss: If the flow is not found in the host flow table, the frame is forwarded to the flow learning process.
  3. The application decides actions and performs flow learning.
    Note: The creation time stamp of the flow is stored in the host flow table.

Flow unlearning

A flow can be deleted from the flow table (flow unlearning) in three ways.
  1. TCP termination: TCP flows can be unlearned at TCP termination. Automatic TCP flow unlearning is configurable on a per-flow basis.
  2. Timeout: The SmartNIC flow scrubber reads the SmartNIC flow table and times out inactive flows. The timeout value is configurable globally.
  3. The application manually unlearns a flow.
When a flow is unlearned, a flow info record is generated and forwarded to the host. It is configurable on a per-flow basis whether a flow info record is generated at flow unlearning. The application can then read the flow info record and add to stored flow metadata in the host flow table. Flow info records can be used for generating NetFlow/IPFIX records in the application.