Use this information to configure the SmartNIC and capture frames on all ports and deliver them across 8 host buffers.
This figure shows the test setup.
Figure 1. Setup overview for distributing frames to multiple host buffers
All ports of the SmartNIC are connected to the traffic generator. Received frames are distributed to 8 host buffers / streams using the 5-tuple hash mode.
-
Configure the SmartNIC.
The Napatech driver uses host buffers to receive and transmit data. Host buffers are configured in the ntservice.ini file. Edit the ntservice.ini file.
The following shows the default host buffer configuration.vim /opt/napatech3/config/ntservice.ini
Four 16-Mbyte host buffers are configured on the NUMA node taken from the NumaNode value.NumaNode = -1 HostBuffersRx = [4,16,-1]NUMAnode = -1means that the driver attempts to determine the NUMA node location of the SmartNIC. Set the number of the RX host buffers to 8 as follows.
ntservice must be stopped and restarted for changes to take effect.HostBuffersRx = [8,16,-1]/opt/napatech3/bin/ntstop.sh /opt/napatech3/bin/ntstart.shFor more information on configuration parameters in the /opt/napatech3/config/ntservice.ini file, see ntservice ini file in DN-0449.
-
Create a file with the following NTPL commands.
This configures the SmartNIC to distribute frames to stream 0, 1, 2, 3, 4, 5, 6 and 7 based on 5-tuple sorted hash values. The frames of the same IP/UDP/TCP session are delivered to the same stream usingDelete = All HashMode = Hash5TupleSorted Assign[StreamId=(0..7)] = AllHash5TupleSorted. Apply the NTPL commands.
An output example:/opt/napatech3/bin/ntpl -f <file_name>NTPL CMD: Delete = All NTPL ID: 0 NTPL CMD: HashMode = Hash5TupleSorted NTPL ID: 1 NTPL CMD: Assign[StreamId=(0..7)] = All NTPL ID: 2 -
Start 8 instances of throughput.
On each terminal, run one instance of throughput as follows./opt/napatech3/bin/throughput -s <stream_ID>/opt/napatech3/bin/throughput -s 0 /opt/napatech3/bin/throughput -s 1 /opt/napatech3/bin/throughput -s 2 ... /opt/napatech3/bin/throughput -s 7 - Start transmitting frames on the traffic generator.
-
Run the monitoring tool on a new terminal to check the RX
statistics.
/opt/napatech3/bin/monitoring -
Run the profiling tool on a new terminal to check the host buffer
status.
An output example:/opt/napatech3/bin/profiling│ Hb# A:Feed N Type Pkt data Pkts Drop pkts Buf% # ID │ │ 0 0:000 1 RX 7E9EBEBDA 28E5288 0 0.0 0 0 │ │ 1 0:001 1 RX 84BC675B4 2B515AC 0 0.0 0 1 │ │ 2 0:002 1 RX 9A28CDFD8 31F0040 0 0.0 0 2 │ │ 3 0:003 1 RX 881A42ABA 2CC49DA 0 0.0 0 3 │ │ 4 0:004 1 RX 80DB6E778 29F84FE 0 0.0 0 4 │ │ 5 0:005 1 RX 8933A3FAA 2C1A43C 0 0.0 0 5 │ │ 6 0:006 1 RX 7DC75EDAC 285967C 0 0.0 0 6 │ │ 7 0:007 1 RX 903307414 2EF8030 0 0.0 0 7 │ │ 8 0:000 1 TX - - - - 0 - │ │ 9 0:001 1 TX - - - - 0 - │ │ 10 0:002 1 TX - - - - 0 - │ │ 11 0:003 1 TX - - - - 0 - │ └──────────────────────────────────────────────────────────────────────────────┘ Quit Host Buffers Streams StreamIds Reset DecHex Tot/Spd FDump
The received frames are distributed to 8 host buffers / streams.
Related information