The advanced load distribution feature is introduced in the Link™
Capture Software 12.6 release. The following figure illustrates, at a high level, how it is
implemented in NT200A02 SmartNICs running on a capture/replay image. As shown in the figure,
the load balancer module controls distributing received frames to multiple streams in the
host as well as retransmitting on physical ports. See DN-0449 for further information in detail regarding the advanced load
distribution feature.
Action command
To utilize the new advanced load
distribution feature, a new command Action in combination with the
existing Assign command must be used in the NTPL configuration as shown
in the example below.
The
above NTPL example will distribute all received IP packets on port 0 to streams in the host
and retransmit the same frames on port 1. Using the Action command, it is
possible to control the packet distribution. You can define the number of indexes for
dividing the received traffic, associate indexes and streams in the host and associate
indexes and ports/VLANs for retransmission. As shown in the above command example, the
Width parameter is to specify the number of indexes. The packet
indexing is controlled by a "table" in the FPGA with 4096 entries. This means that it is
possible to divide traffic using 4096 VLAN individual tags. The following figure shows how
the Action command is operated in the table.
Note: The existing syntax Assign[StreamId=0..3] = All is still supported.
It can also be converted as below using the new Action command.
Action[Tag=Test2; Width=4] = {Index=0..3; StreamId=0..3}
Assign[Action=Test2] = All
Load distribution to external
servers
The advanced load distribution can be used with a VLAN-aware switch to
distribute traffic to multiple servers with a standard NIC as shown in the figure below.
The same result can be achieved using a daisy-chained setup without a VLAN-aware
switch. In the figure below, the server with an NT200A02 running on a capture/replay image
is placed first. The NT200A02 will filter and distribute traffic with the specified number
of indexes after adding VLAN tags as specified. The external servers with a standard NIC
will then only filter on one or more matching VLAN tags.
The NTPL example below can be used to distribute the traffic to external servers. All
received frames will obtain 4 VLAN tags (100, 101, 102 and 103) and will be transmitted on
port 1.
Action[Tag=Test3; Width=4] = {Index=0..3; DestinationPort=1; Vlan=100..103}
Assign[Action=Test3] = All
The
following is another NTPL example to distribute all received frames to the host and 3 other
servers. The first four out of 16 indexes are associated to streams in the host, and the
last 12 indexes are associated to port
1.
Note: TPID
0x8100, 0x88A8 and 0x9100 are supported. Default is 0x8100 if not specified.
Traffic load
balancing
To avoid unevenly overloading CPU cores, a different number of indexes can be associated to each
stream using the Action command. The following NTPL command example is to
deliver received frames to 4 streams associating ten indexes to stream 0, four indexes to
stream 1 and six indexes to stream 2 and
3.
Each
stream will receive a portion of indexes representing the traffic. Using the above NTPL
example, stream 0 will get 50% of indexes, stream 1 will get 20% of indexes and stream 2 and
3 will get 30% of indexes.
Note: A portion of indexes does not necessarily represent the
same portion of traffic. Dividing traffic between indexes is based on a hash value which
cannot guarantee a perfect distribution.