How-to: Updating Napatech NICs

This how-to discusses how to install the latest drivers for the Napatech NICs we use for high data throughput host systems.

1. Summary

1.1 Download the latest drivers

The latest drivers can be downloaded from here.

You will need to download the ntal package, which is: Link-Capture™ Software for Napatech FPGA SmartNICs. We recommend that you look over the README file to identify the correct FPGA image based on the hardware (NT200A02) and the desired profile. The specific profiles are described here.

Note

For Rx only streaming, we suggest installing the capture profile, which supports zero packet loss sustained high rate capture.

For Tx only streaming, we suggest the Traffic Gen profile.

For Normal use (Rx/Tx) streaming, we suggest the Capture Replay profile, but if you’re experiencing issues at high sample rates (>20Gbps per port), then you may benefit from switching to the inline or traffic gen profiles. Discuss this with us prior to switching.

2. Detailed Procedure

2.1. Step 1: Identify FPGA Image

For the Tx/Rx profile version, you can identify the latest product download, and select an appropriate FPGA image. Information on FPGA images for Napatech NICs are discussed here.

2.2. Step 2: Download Update

Download the desired update to the host machine.

2.3 Step 3a: Install Software Update

Documentation on software updates for Napatech NICs are here.

Depending on how recent the previous FPGA image is, you can either aim to only update the FPGA image, or else update BOTH the FPGA the link capture software. The ideal course of action would be to install and update both the FPGA and link capture software, but this sometimes may result in issues with the configuration files. Per Vices aims to try and keep up-to-date configuration files for napatech here.

2.4 Step 3b: Install Napatech FPGA Update

See the vender FPGA Update Documentation for further information.

Note

Sometimes you’ll need to update the imgctrl software first. First test to see whether it works by entering the “imgctrl” directory in the update package that you downloaded, and run “imgctrl –query” to see whether it correctly reports the device info.

If you just want to update the FPGA image, you’ll have to stop a number of services and unload the drivers. Run the following commands, as root. Use the following commands to do this:

$ sudo -i
$ systemctl stop nprobe
$ systemctl stop ntopng
$ cd /opt/napatech3/bin
$ sudo ./ntstop.sh
$ sudo ./ntunload.sh

Note

By default, we ship our Napatech NICs with the 40G and 100G images loaded on different banks. It’s important to ensure that we have the correct bank specified.

Note

We strongly recommend running the imgctrl tool with the –query call, and save the resulting output. This will provide critical versioning information if you need to go back to an older version.

$ sudo ./imgctrl --query #Shows which image is presently on the adapters

For programming the new FPGA image, the actual update procedure is very straight forward. For each adapter, run the following command:

$ imgctrl -p --adapter 0 -g -v --ini cr1 --ntimg <ntimg file>
$ imgctrl -p --adapter 1 -g -v --ini cr1 --ntimg <ntimg file>

2.5 Step 3c: Switching FPGA images

The FPGA is NOT COMPLETE until we switch to the new FPGA image!

Once you’ve uploaded a new image, installation is not complete, and the image will not load, until you switch to it using the following commands:

$ sudo ./imgctrl --switch --adapter 0
$ sudo ./imgctrl --switch --confirm --adapter 0

For further information on switching FPGA images, read the following documentation.

2.6 Update ntservice.ini

Some updates result in incompatible changes to configuration file options. We try and keep up-to-date configuration files here. We very strongly suggest copying these two files into your local /opt/napatech3/config directory. Then, overwrite the old ntservice.ini with either the osmode (for Rx/Tx) or native mode (for Rx only) configuration file.

For example, for 40G, Rx/Tx, in osmode (ie: rx/tx), you can do the following:

# rename the existing configuration files
$ cd /opt/napatech3/config
$ sudo mv ntservice.{ini,ini.bu}
$ sudo mv ntservice-osmode.{ini,ini.bu}
$ sudo mv ntservice-native.{ini,ini.bu}
# Download the latest osmode and native ntservice.ini files;
$ sudo wget https://raw.githubusercontent.com/pervices/pvpkg/master/common/napatech-conf/opt/napatech3/config/ntservice-osmode.ini
$ sudo wget https://raw.githubusercontent.com/pervices/pvpkg/master/common/napatech-conf/opt/napatech3/config/ntservice-native.ini
# NATIVE mode (Rx only, using sdr2disk tool)
$ sudo cp ntservice-native.ini ntservices.ini
# OSMODE (Rx/Tx/Gnuradio): Copy the newly downloaded  latest file to the ntservice.ini configuration.
$ sudo cp ntservice-osmode.ini ntservices.ini
Once this is complete, you should be able to reboot the unit, and confirm operation.

3. Rx/Tx Napatech NIC Update Example

3.1 Finding the FPGA image

For an Rx/Tx application, using the latest update as of 2022-09-06, we find the update page on Napatech’s support site here.

And the README page here.

Using your current hardware, (NT200A02), and knowing that our required connection is 2x40G connections per adapter, and selecting a desired profile of Capture/Replay, we use the profile to select the following FPGA image: 200-9526-43-13

3.2 Perform Update

Prior to completing any update, we have to stop a number of services and unload the drivers. To stop the existing services, you can run the following commands:

$ sudo -i
# Stop all services and unload existing drivers
$ sudo systemctl stop nprobe
$ sudo systemctl stop ntopng
$ cd /opt/napatech3/bin
$ sudo ./ntstop.sh
$ sudo ./ntunload.sh

Update the core software using the following commands:

# Navigate back to update directory and update sofware
$ cd ~/Downloads/ntanl_package_3gd-12.8.1.1-linux/
$ sudo ./package_install_3gd.sh
# Follow prompts and confirm installation to /opt/napatech3

Update the FPGA Image using the following commands:

#Navigate to directory where update package was downloaded and extracted
$ cd ~/Downloads/ntanl_package_3gd-12.8.1.1-linux/imgctrl 
# Confirm operation of imgctrl tool
$ ./imgctrl --query  > ~/imgctrl-query-bu #Save output to log
# Perform actual update from within this directory for both adapters as follows;
$ sudo ./imgctrl -p --adapter 0 -g -v --ini cr1 --ntimg ../images/NT200A02/200-9526-43-13-00.ntimg 
$ sudo ./imgctrl -p --adapter 1 -g -v --ini cr1 --ntimg ../images/NT200A02/200-9526-43-13-00.ntimg
# Once update is complete, switch to the new FPGA image;
$ sudo ./imgctrl --switch --adapter 0 && sudo ./imgctrl --switch --confirm --adapter 0
$ sudo ./imgctrl --switch --adapter 1 && sudo ./imgctrl --switch --confirm --adapter 1
# Confirm the image was successfully update by looking at the version;
$ sudo ./imgctrl --query --adapter 0
$ sudo ./imgctrl --query --adapter 1

Update the Napatech configuration files, nothing that some updates result in incompatible changes to configuration file options. For example, for 40G, Rx/Tx, in osmode (ie: rx/tx), you can do the following:

# rename the existing configuration files
$ cd /opt/napatech3/config
$ sudo mv ntservice.{ini,ini.bu}
$ sudo mv ntservice-osmode.{ini,ini.bu}
$ sudo mv ntservice-native.{ini,ini.bu}
# Download the latest osmode and native ntservice.ini files;
$ sudo wget https://raw.githubusercontent.com/pervices/pvpkg/master/common/napatech-conf/opt/napatech3/config/ntservice-osmode.ini
$ sudo wget https://raw.githubusercontent.com/pervices/pvpkg/master/common/napatech-conf/opt/napatech3/config/ntservice-native.ini
# OSMODE (Rx/Tx/Gnuradio): Copy the newly downloaded  latest file to the ntservice.ini configuration.
$ sudo cp ntservice-osmode.ini ntservices.ini

After performing all the above steps, you should be able to reboot the unit, and confirm operation, and successful update, using the imgctrl tool. To do this, run the following commands:

$ sudo ./imgctrl --query --adapter 0
$ sudo ./imgctrl --query --adapter 1

Then, confirm that GNU Radio works as expected (if using OSmode configuration).

4. Switching between OSmode and Native Mode

To switch between OSmode and Native mode, see the following how-to guide.