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.
- The flow manager looks up the flow in the flow table when a frame is received in the
SmartNIC.
- 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.
- 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.
- The application looks up the flow of the received frame.
- Hit: If the flow is found in the host flow table, actions are applied.
- Miss: If the flow is not found in the host flow table, the frame is forwarded to the flow learning process.
- 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.
- TCP termination: TCP flows can be unlearned at TCP termination. Automatic TCP flow unlearning is configurable on a per-flow basis.
- Timeout: The SmartNIC flow scrubber reads the SmartNIC flow table and times out inactive flows. The timeout value is configurable globally.
- The application manually unlearns a flow.