This is a typical scenario of the flow processing in the SmartNIC running Napatech Link-Inline™ Software and the application.
Managing flows
When a frame is received, the SmartNIC looks up the flow of the frame in the flow table as
illustrated in this figure.
If the flow of a received frame is found in the SmartNIC flow table (hit), the frame is
processed as follows:
- Hairpin offloads: The SmartNIC performs frame processing such as policy lookups / rate limiting, updating usage counters for metering, protocol encapsulation/decapsulation and modifying header fields.
- The frame is transmitted.
- The usage information for metering can be retrieved by the application.
If the flow of a received frame is not found (miss), the frame is processed as follows :
- The frame is forwarded to the host for further processing in the application. The SmartNIC can distribute these frames across multiple RX queues in the host.
- The application configures the SmartNIC with a new flow rule for the forwarded frame.
- The application performs processing of the frame, such as protocol encapsulation/decapsulation and/or modifying header fields.
- The application adds the frame to a TX queue.
- The frame in the TX queue is forwarded to the SmartNIC.
- The SmartNIC transmits the frame without any further processing.
Note: Received frames are not stored in onboard SDRAM of the SmartNIC before transferred to
the host memory.
Note: The SmartNIC transmits frames from the host without any changes except that the FCS is
recalculated.
Supported rte_flow patterns and actions
DPDK rte_flow is used to configure the SmartNIC with Napatech Link-Inline™ Software to match specific traffic, take a list of actions and update/generate related counters. The flow lookup can be performed on the various header fields of a frame as follows.
- MAC source and destination addresses
- IPv4/IPv6 source and destination addresses
- UDP/TCP/SCTP source and destination port numbers
- GTP TEID
- VLAN
- EtherType
The supported rte_flow actions include:
- Queue: Forwarding to a specific queue.
- Receive side scaling (RSS): Distributing frames across multiple RX queues.
- Drop: Dropping a frame.
- TX port: Transmitting on a specific port.
- Meter ID: Policing object ID.
- Raw encapsulation/decapsulation.
- Modifying any relevant header fields.