Compile and Install DPDK with the Napatech PMD

Getting Started with Napatech Link-Virtualization™ Software

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

Procedure

  1. Locate the DPDK directory in the unpacked Link-Virtualization™ Software package directory and change to that directory.
    For example:
    cd <package_root_directory>/dpdk-hwaccel/dpdk-hwaccel-<version>
    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.
  2. Install packages required to build DPDK.
    # Enable the powertools repository.
    dnf config-manager --set-enabled powertools
    
    # Install meson and ninja-build.
    dnf install meson ninja-build
  3. Compile and install DPDK.
    export NTNIC_PATH=/opt/napatech3
    meson build
    ninja -C build
    ninja -C build install
    Note: /opt/napatech3 is the default driver installation path. If you have installed the driver in a different location, make sure that the NTNIC_PATH environment variable points to the correct path.
  4. Set the pkgconfig path to the PKG_CONFIG_PATH environment variable. The path can be found running the following command.
    meson configure
    The path to the installed DPDK libraries is <prefix>/<libdir> where prefix and libdir can be found in the meson configure output as shown in the following example:
    ...
    Directories     Default Value    Possible Values    Description
    -----------     -------------    ---------------    -----------
    prefix          /usr/local                          Installation prefix
    ...
    libdir          lib64                               Library directory
    ...
    
    Set PKG_CONFIG_PATH.
    export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
  5. Activate the path to the libraries.
    ldconfig
    
    # Verify
    ldconfig -p | grep librte
    Note: On some Linux distributions, such as CentOS, Fedora or RHEL, paths in /usr/local are not in the default path for the dynamic loader. Therefore, add /usr/local/lib and the path to the DPDK libraries to the /etc/ld.so.conf.d/napatech3.conf file before running ldconfig on these distributions. For example:
    echo -e "/usr/local/lib64\n/usr/local/lib64/dpdk" >> \
     /etc/ld.so.conf.d/napatech3.conf
    The path to the DPDK libraries may vary depending on the Linux distribution. See step 4 about how to find the path.