Life of a Flow

Stateful Flow Management

product_line_custom
Napatech SmartNIC
category
User Guide

This is the life cycle of a typical flow.

Flow creation

  1. The Hardware (HW) Flow Matcher looks up the flow:
    1. If the flow is found (HIT): Actions are applied
    2. If the flow is not found (MISS): the flow is forwarded to the Slow Path (SP)
  2. The Software (SW) Flow Matcher looks up the flow:
    1. If the flow is found (HIT): Actions are applied
    2. If the flow is not found (MISS): the flow is forwarded to Software Learning (SL)
  3. SL processes the packets and decides the actions.
  4. SL programs the Hardware (HW) and Software (SW) Flow Tables and Actions.
  5. The creation time stamp and initial metrics are sent to the SW Flow Table.

The steps are reflected in the life cycle diagram:


Flow life cycle in hardware and software, showing HIT and MISS paths

Flow termination

Flows can be terminated in three ways:
  1. The Flow Manager recognizes TCP flow terminations. This can be configured on a per-flow basis.
  2. The HW Flow Scrubber reads the HW Flow Table and times out inactive flows. A timeout is configured globally.
  3. The software application can terminate (delete) a flow.
When a flow is terminated:
  1. A Flow Info Record is generated and sent to the SW Flow Handler.
  2. The SW Flow Handler handles the Flow Info Records by:
    1. Merging the Flow Info Record metadata with metadata from the SW Flow Table
    2. Generating NetFlow/IPFIX records or similar, if required
    3. Sending the Flow Info record to the same flow stream that configured the flow

Here is an alternative flow diagram:


Alternative flow life cycle in hardware and software, showing HIT and MISS paths