Managing the Life of a Flow

Stateful Flow Management

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

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.


Page-1 Sheet.1 Application Application Sheet.2 SmartNIC SmartNIC Sheet.3 Flow manager Flow manager Sheet.4 Flow table Flowtable Sheet.5 Actions Actions Sheet.6 Flow scrubber Flowscrubber Sheet.7 Flow manager Flow manager Sheet.8 Flow table Flowtable Sheet.9 Actions Actions Sheet.10 Learning Learning Sheet.11 NetFlow generator NetFlowgenerator Sheet.12 Sheet.13 Sheet.14 Sheet.15 Bent Arrow.14 Bent Arrow.21 Bent Arrow.23 Bent Arrow.25 Bent Arrow.26 Simple Arrow.28 HIT HIT Sheet.22 MISS MISS Sheet.23 MISS MISS Bottom to side 2 Bottom to side 2.34 Bottom to side 2.35 Bottom to side 2.36 Bent Arrow.24 Simple Arrow.29 HIT HIT Bent Arrow.22 Bent Arrow.20 Sheet.32 Sheet.33 Sheet.34 Sheet.35 MISS MISS Sheet.36 Sheet.37 Simple Arrow.49 Flow record Flow record Sheet.39 Sheet.40 Per frame metrics and state update Per frame metrics and state update Sheet.41 Sheet.42 Sheet.43 Add to flow table Generate flow Record Add to flow tableGenerate flow Record Sheet.44 Sheet.45 Sheet.46 Per flow termination event Per flow termination event Sheet.48 Sheet.49 Circle 1 1 Circle.52 1a 1a Circle.53 1b 1b Circle.54 2a 2a Circle.55 2b 2b Circle.56 3 3 Circle.57 2 2

  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.