Updating the FPGA image

Getting Started with Napatech Link-Virtualization™ Software

Platform
Napatech SmartNIC
Content Type
Getting Started
Getting Started Guide
Capture Software Version
Link-Virtualization™ Software 4.5

Use the imgctrl tool to query, program and switch to a new FPGA image.

About this task

This procedure describes imgctrl command examples to update the FPGA image.

Procedure

  1. Enter the following command to list the available FPGA images.
    cd <package_root_directory>
    ls -R images/
    where:
    • package_root_directory is the directory to the unpacked Napatech package.

    This is an example of an output from this command.

    images/:
    NT200A02  NT50B01
    
    images/NT200A02:
    200-9530-42-05-00-210601-2117.ntimg
    
    images/NT50B01:
    200-9542-42-05-00-210602-2336.ntimg
    
  2. Flash the FPGA with the appropriate image using the imgctrl command .
    imgctrl -a 0 -p --ntimg <path_to_image_file> \
      --ini <id_string>
    where:
    • path_to_image_file specifies the path to the .ntimg FPGA image file to be uploaded to the flash
    • id_string specifies a user-chosen identifier

    This is an example of the command to flash the FPGA.

    imgctrl/imgctrl -a 0 -p \
      --ntimg 200-9530-42-05-00-210601-2117.ntimg \
      --ini LinkVirt-4.2
    
    An output example:
    ...
    Scanning for Napatech adapters..
    Adapter upgrade commencing..
    Writing FPGA bank 1
      Erasing................... 100% done
      Writing................... 100% done
      Verifying................. 100% done
    Done writing FPGA bank 1
    Note: You can inspect the upload result through the Bank1 Contents
          section using the --query mode. To try the new image, remember
          to switch bank using the --switch mode. See --help for more information.
    Upgrade process complete
    
    Note: Refer to Handling FPGA Images on the Napatech Documentation Portal for complete documentation on the Napatech image control tool imgctrl.
  3. Switch to the new FPGA image using the imgctrl command.
    imgctrl/imgctrl -s -a 0
    imgctrl/imgctrl -s -a 0 --confirm
    Note:

    Switching to the new FPGA image may fail with an error as follows.
    ...
    Error: You cannot quick switch image. New image requires different set of PCI resources,
           which must be assigned during the PCI resource enumeration at server reboot.
           Please use --pcirst command and reboot the entire host to switch image.
      FAIL. Switching failed. Use --query to examine adapter
    
    The server must be rebooted as reloading the FPGA is not sufficient.
    Use the --pcirst option to perform a PCI Reset switch method which will execute on next system reboot. Remember to --confirm the switch after rebooting. This is an example command sequence with a PCI Reset.
    imgctrl/imgctrl -s -a 0 --pcirst
    reboot
    imgctrl/imgctrl -s -a 0 --confirm
    Note: 33.00 or newer version FPGA images support SR-IOV capabilities. If the FPGA image of the SmartNIC has been switched from an older version to 33.00 or newer version, you must reboot the server to enumerate SR-IOV capabilities.
  4. Confirm the FPGA image state running the following command.
    imgctrl/imgctrl -q
    An output example:
    imgctrl v3.13.0.4-ccbef (Jan  4 2021 19:15:51) (Logfile: /tmp/imgctrl.log)
    Scanning for Napatech adapters..
    Adapter 0:
         PCI SLOT        : 0000:03:00.0
         PCI DEVICE ID   : 01C5
         PCI LANES       : x16
         ADAPTER TYPE    : NT200A02-01-SCC-2x100/40-E3-FF-ANL 2x100Gb QSFP28 / 2x40Gb QSFP+ platform
    RUNNING FPGA:
         FPGA IDENT      : 200-9530-42-05-0000
         DESCRIPTION     : 2x25Gb, virtualization
    FPGA BANK0:
         PRODUCT CODE    : 9521
         VERSION         : 28.07
         DOWNLOADED BY   : ntope
    FPGA BANK1:
         PRODUCT CODE    : 9530
         VERSION         : 42.05
         DOWNLOADED BY   : LinkVirt-4.2
    SUPPORTCHIP INFO:
         NT200A02        : v3.5r
    FPGA IMAGE STATE:
         IMAGE STATE     : NEUTRAL (code 0)
         PRIMARY BANK    : 1
         RUNNING BANK    : 1