Capture and Distribute to 8 Host Buffers

Link-Capture™ Software Getting Started Guide

Platform
Napatech SmartNIC
Content Type
Getting Started
Capture Software Version
Link™ Capture Software 12.8

This describes how to configure the SmartNIC and capture frames on all ports and deliver to 8 host buffers.

About this task

This figure shows the test setup.


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.

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.

Procedure

  1. 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.
    vim /opt/napatech3/config/ntservice.ini
    The following shows the default host buffer configuration.
    NumaNode = -1
    HostBuffersRx = [4,16,-1]
    Four 16-Mbyte host buffers are configured on the NUMA node taken from the NumaNode value. NUMAnode = -1 means 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.
    HostBuffersRx = [8,16,-1]
    ntservice must be stopped and restarted for changes to take effect.
    /opt/napatech3/bin/ntstop.sh
    /opt/napatech3/bin/ntstart.sh
    See ntservice.ini for more information about the configuration parameters in the /opt/napatech3/config/ntservice.ini file.
  2. Create a file with the following NTPL commands.
    Delete = All
    HashMode = Hash5TupleSorted
    Assign[StreamId=(0..7)] = All
    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 using Hash5TupleSorted. Apply the NTPL commands.
    /opt/napatech3/bin/ntpl -f <file_name>
    An output example:
    NTPL CMD: Delete = All
    NTPL ID:    0
    NTPL CMD: HashMode = Hash5TupleSorted
    NTPL ID:    1
    NTPL CMD: Assign[StreamId=(0..7)] = All
    NTPL ID:    2
  3. Start 8 instances of throughput.
    /opt/napatech3/bin/throughput -s <stream_ID>
    On each terminal, run one instance of throughput as follows.
    /opt/napatech3/bin/throughput -s 0
    /opt/napatech3/bin/throughput -s 1
    /opt/napatech3/bin/throughput -s 2
    ...
    /opt/napatech3/bin/throughput -s 7
  4. Start transmitting frames on the traffic generator.
  5. Run the monitoring tool on a new terminal to check the RX statistics.
    /opt/napatech3/bin/monitoring
  6. Run the profiling tool on a new terminal to check the host buffer status.
    /opt/napatech3/bin/profiling
    An output example:
    │ 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