Capture Frames on RX Port number

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 using two host buffers / streams based on received port numbers.

About this task

This figure shows the test setup.


Two ports of a SmartNIC are connected to each other. Two instances of the pktgen tool will be used to generate and transmit frames, and two instances of the throughput tool will be used to capture and measure throughput.

Two ports of the SmartNIC on the server are connected to each other. Two instances of the pktgen tool are used to generate and transmit frames, and two instances of the throughput tool are used to capture and measure throughput.

Procedure

  1. Configure the SmartNIC to capture received frames on port 0 and 1.
    Create a file with the following NTPL commands which configure two port filters. Each filter is set to capture frames that are received on a specific port.
    # Delete previously configured filters.
    Delete = All
    
    # Stream 0 captures frames received on port 0.
    Assign[StreamId=0] = Port==0 
    
    # Stream 1 captures frames received on port 1.
    Assign[StreamId=1] = Port==1
    Apply the configuration.
    /opt/napatech3/bin/ntpl -f <file_name>
    For example:
    /opt/napatech3/bin/ntpl -f config.ntpl
    An output example:
    NTPL CMD: Delete = All
    NTPL ID:    0
    NTPL CMD: Assign[StreamId=0] = Port==0
    NTPL ID:    1
    NTPL CMD: Assign[StreamId=1] = Port==1
    NTPL ID:    2
  2. Start throughput.
    On one terminal:
    /opt/napatech3/bin/throughput -s 0
    On another terminal:
    /opt/napatech3/bin/throughput -s 1
  3. Start pktgen.
    On one terminal:
    /opt/napatech3/bin/pktgen -p0 -n0 -r 10G -s r[64:1518] -t udp
    On another terminal:
    /opt/napatech3/bin/pktgen -p1 -n0 -r 10G -s r[64:1518] -t udp 
    Note: The command line options in the pktgen examples are:
    • -p0: Transmit on port 0.
    • -n0: Transmit frames until pktgen is stopped.
    • -r 10G: Transmit frames at 10 Gbytes/s.
    • -s r[64:1518]: Generate frames with random size between 64 to 1518 bytes.
    • -t udp: Generate UDP frames.
  4. Check the statistics in the monitoring tool.
    /opt/napatech3/bin/monitoring
    An output example:
    *───────────────────── monitoring (v. 3.25.4.5-5a719256) ──────────────────────┐
    │  P  A        Type       Link    Down          Rx          Tx  Max  Temp.     │
    │  0  0 SFP28-SR-DR   25G Full       0    9999.89M       0.00M  9018 47.30 C   │
    │  1  0 SFP28-SR-DR   25G Full       0    9999.90M       0.00M  9018 47.30 C   │
    └──────────────────────────────────────────────────────────────────────────────┘
     Port  0 - Adapter 0 Intf 0: NT50B01_2x25
    ┌──────────────────────────────────────────────────────────────────────────────┐
    │                                RX RMON1 counters                      Totals │
    │ Packets         : #000000000115529206  Octets          : #000000091712211227 │
    │ Broadcast       : #000000000000000000  Multicast       : #000000000000000000 │
    │ 64 octets       : #000000000000050645  65-127 octets   : #000000000005323199 │
    │ 128-255 octets  : #000000000009785473  256-511 octets  : #000000000020167384 │
    │ 512-1023 octets : #000000000040559833  1024-1518 octets: #000000000039642672 │
    │ Undersize       : #000000000000000000  Oversize        : #000000000000000000 │
    │ Fragments       : #000000000000000000  Collisions      : #000000000000000000 │
    │ Drop events     : #000000000000000000  Crc/Align errors: #000000000000000000 │
    │ Jabbers         : #000000000000000000  Ext drops       : #000000000000000000 │
    └──────────────────────────────────────────────────────────────────────────────┘
     Reset Tx/Rx 0RMON 1ExtRMON 2Checksum 3Decode 4Drop 5IPF Dec/Hex Tot/Spd
     Quit  Sensors Color stat XTimeSync IEEE 1588 PTP EStream LFlowstat FDump