Distributing Traffic Based on Filtering

Multi-CPU Distribution

product_line_custom
Napatech SmartNIC
category
User Guide

Selection based on filtering

Filter logic can be used to enable multi-CPU distribution. All of the filtering functionality (see DN-1108) can be used for this purpose.

Protocol filter with round robin distribution example

In this example, all traffic will be sent to stream 7 by default, but all UDP and TCP traffic will be distributed in round robin fashion between streams 0, 1, 2, 3, 4, 5 and 6.

Assign[StreamId=7] = All
Assign[StreamId=(0..6)] = Layer4Protocol == UDP, TCP

This example does not use explicit priorities, but relies on the UDP/TCP filter being last, taking precedence over the previous filter.

Protocol and accelerator port filter example

In this example, protocol filters are used to direct all UDP frames received on port 0 or 1 to stream 0, all TCP frames received on port 0 or 1 to stream 1, all SCTP frames received on port 0 or 1 to stream 2 and all other frames received on port 0 or 1 to stream 3.

HashMode = None
Assign[StreamId = 0; Priority = 0] = Layer4Protocol == UDP AND Port == (0..1)
Assign[StreamId = 1; Priority = 0] = Layer4Protocol == TCP AND Port == (0..1)
Assign[StreamId = 2; Priority = 0] = Layer4Protocol == SCTP AND Port == (0..1)
Assign[StreamId = 3; Priority = 1] = Port == (0..1)

In this example, the explicit priority on the filters ensure that the last filter does not take precedence. 0 is the highest priority.