Load distribution using the Action command
Received traffic can be distributed to the host as well as multiple servers using the
Action command in combination with the Assign
command. The following NTPL example shows how to configure the SmartNIC to distribute frames
to the host as well as to another server at the same
time.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted
Action[Tag=example; Width=24]={Index=0..11; StreamID=0..11},\\
{Index=12..23; DestinationPort=1}
Assign[Action=example] = Port==0
The
Width parameter specifies the number of indices which are used for
dividing the received traffic. The load distribution is configured by associating indices to
streams in the host and associating indices to physical ports. In this NTPL example, the
first 12 out of 24 indices are associated to streams in the host, and the last 12 indices
are associated to port 1. The frame indexing is controlled by a "table" with 4,096 entries in the SmartNIC. The following figure shows how the Action command is operated in the index table. The indexing table contains information including stream ID, port number and VLAN tag.
Figure. Frame indexing table structure in the SmartNIC
The following figure shows that the load balance module controls distributing received frames to multiple streams in the host as well as retransmitting on physical ports.
Figure. Load balance module
Load distribution to external servers using VLAN tagging
Note: The VLAN tagging feature of the
locally retransmitted frames is supported on the following SmartNICs:
Traffic can be distributed to multiple servers with a standard NIC via a VLAN-aware
switch as shown in the figure below.- NT400D13 SmartNICs running on a test and measurement image
- NT400D11 SmartNICs running on a test and measurement image
- NT200A02 SmartNICs running on a test and measurement image
- NT100A01 SmartNICs running on a test and measurement image
Figure. Distributing traffic on VLAN IDs using a VLAN-aware switch
In the figure, all received frames are distributed to the host and 3 other servers.
All received frames will obtain 3 VLAN tags (101, 102 and 103) and will be transmitted on
port 1. See an NTPL example
below.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted
Action[Tag=vlan_example; Width=16] = {Index=0..3; StreamId=0..3}, {Index=4..15; DestinationPort=1; Vlan=101..103}
Assign[Action=vlan_example] = All
In this NTPL example, The first 4 out of 16
indices are associated to 4 streams in the host, and the last 12 indices are associated to
port 1. Frames can be distributed to multiple servers based on the VLAN ranges as shown in the following figure.
Figure. Distributing traffic on VLAN ID ranges using a VLAN-aware switch
The received frames in each server can be distributed and processed in multiple CPU
cores using VLAN tags if the networking device capable of receive side scaling (RSS) is used
in the system, for example. See an NTPL example
below.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted
Action[Tag=vlan_example; Width=12] = {Index=0..3; StreamId=0..3}, \\
{Index=4..11; DestinationPort=1; Vlan=101..108}
Assign[Action=vlan_example] = All
Adding VLAN TPIDs is supported in
addition to adding VLAN tags. The following NTPL example shows how to add a VLAN TPID.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted
Action[Tag=vlan_example; VlanTpid=0x9100; Width=8] = {Index=0..7; StreamId=0..3}, \\
{Index=0..7; DestinationPort=1; Vlan=101..108}
Assign[Action=vlan_example] = All
Note: TPID 0x8100, 0x88A8 and 0x9100 are
supported. Default is 0x8100 if not specified.