Load Link-Inline™ Software Driver

Link-Inline™ Software User Guide

Platform
Napatech SmartNIC
Content Type
User Guide
Capture Software Version
Link-Inline™ Software 3.0

Before you begin

  • Unbind the SmartNIC from its current driver using the dpdk-devbind tool. For example:
    DEV=$(lspci -Dd 18f4: | cut -d' ' -f1 | head -1)
    dpdk-devbind.py -u $DEV

About this task

Load the vfio-pci driver and bind the Napatech SmartNIC to the vfio-pci driver using the dpdk-devbind tool.

Procedure

  1. Load the vfio-pci driver.
    modprobe vfio-pci enable_sriov=1
    Run the following command to verify.
    lsmod | grep vfio
    An output example:
    vfio_pci               65536  0
    vfio_virqfd            16384  1 vfio_pci
    vfio_iommu_type1       45056  0
    vfio                   45056  2 vfio_iommu_type1,vfio_pci
    irqbypass              16384  2 vfio_pci,kvm
  2. Bind the SmartNIC to the vfio-pci driver.
    Check the status of all network devices on the system.
    dpdk-devbind.py --status
    An output example:
    Network devices using kernel driver
    ===================================
    ...
    ...
    
    Other Network devices
    =====================
    0000:42:00.0 'NT200A02 Network Adapter 01c5' unused=vfio-pci
    The NT200A02 SmartNIC is shown as Other Network devices. unused=vfio-pci indicates that the SmartNIC is currently not using the vfio-pci driver.
    DEV=$(lspci -Dd 18f4: | cut -d' ' -f1 | head -1)
    dpdk-devbind.py --bind=vfio-pci $DEV
    where:
    • package_root_directory is the directory to the unpacked Napatech package.
    • version is the version identifier of the included DPDK package with the Napatech PMD.
    This configures the vendor ID and the device ID of the SmartNIC to be controlled by the vfio-pci device driver.
    Or alternatively,
    echo 18f4 <device_id> > /sys/bus/pci/drivers/vfio-pci/new_id
    where:
    • 18f4 is the PCI vendor ID for Napatech.
    • device_id is the PCI device ID for the SmartNIC.
    Enter the following command for an NT200A02 SmartNIC:
    echo 18f4 01c5 > /sys/bus/pci/drivers/vfio-pci/new_id
  3. Verify the status.
    dpdk-devbind.py --status
    An output example:
    Network devices using DPDK-compatible driver
    ============================================
    0000:42:00.0 'NT200A02 Network Adapter 01c5' drv=vfio-pci unused=
    ...
    ...
    
    The NT200A02 SmartNIC is listed as Network devices using DPDK-compatible driver. drv=vfio-pci indicates that the vfio-pci driver is being used.