Installing OVS Offload Software on the IPU

Getting Started with OVS Offload Software

Platform
Napatech IPU
Content Type
Getting Started
Capture Software Version
OVS Offload Software 1.0

Set up the Linux environment and install OVS Offload Software on the IPU.

Before you begin

Make sure that you have:
  • Installed a Napatech IPU in a server. See Installing a Napatech IPU.
  • Programmed the IPU with an appropriate FPGA image. See OVS Offload Software FPGA Images.
  • Remote SSH access to the SoC on the IPU via the management port or the USB port. See DN-1385.
  • Placed the ipu_workload_ovs-<version>-linux.tar.gz package in the /opt/ directory, where version is the version identifier of the package.

About this task

This describes commands to build, install the DPDK and the OVS, configure the environment variables and activate the path to libraries on the IPU.

Note: The following prompts are used to indicate which part of the system to run the provided commands on.
  • soc#: The SoC on the IPU.
  • host#: The server where the IPU is installed.

Procedure

  1. On the IPU, install dependencies.
    soc# dnf -y groupinstall "Development Tools"
    soc# dnf -y install python3
    soc# pip3 install meson ninja
    soc# dnf -y install pciutils-devel json-c-devel
    soc# dnf -y install numactl numactl-devel
  2. Check the huge-pages configuration.
    Enter the following command:
    soc# cat /proc/cmdline
    An output example:
    BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.4.4-100.fc37.x86_64 root=UUID=1fc6afc9-c97d-458b-a98c-6184f9242d05 ro console=ttyS5,115200n8 intel_iommu=on iommu=pt default_hugepagesz=1G hugepagesz=1G hugepages=8 iomem=relaxed
    By default, a huge page size is set to 1 Gbyte and the number of huge pages are set to 8. Adjust the number of huge pages if necessary. For example:
    soc# grubby --args "hugepages=10" --update-kernel ALL
    Run the following command and verify.
    soc# grubby --info=ALL
  3. Reboot the IPU if the huge-pages configuration has been changed.
    soc# reboot now
  4. Verify the number of actual allocated huge pages by entering the following command.
    cat /proc/meminfo | grep Huge
    An output example:
    AnonHugePages:         0 kB
    ShmemHugePages:        0 kB
    FileHugePages:         0 kB
    HugePages_Total:       8
    HugePages_Free:        8
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:    1048576 kB
    Hugetlb:         8388608 kB
  5. Unpack the OVS Offload Software package.
    soc# cd /opt/
    soc# tar zxvf ipu_workload_ovs-<version>-linux.tar.gz
    where version is the version identifier of the package.
  6. Build and install the DPDK.
    soc# cd ipu_workload_ovs/src
    soc# export OVS_INSTALL_DIR=${PWD}
    soc# cd ipu_dpdk
    soc# export DPDK_DIR=${PWD}
    soc# export INSTALL_DIR=$DPDK_DIR/build
    soc# meson setup --prefix=$INSTALL_DIR -Dc_link_args=-fcommon \
    -Dc_args=-fcommon build
    soc# ninja -C build install
    soc# ldconfig
  7. Configure the environment variables for the DPDK.
    Set the PKG_CONFIG_PATH environment variable to include the directory containing the DPDK pkg-config files. This helps applications locate the DPDK during the compilation process.
    soc# export PKG_CONFIG_PATH=$INSTALL_DIR/lib64/pkgconfig:$PKG_CONFIG_PATH
    soc# pkg-config --modversion libdpdk
    pkg-config is a tool to retrieve information about the installed libraries. This command checks and confirms the version of the installed DPDK library. An output example:
    20.11.0

    Update the LD_LIBRARY_PATH environment variable to include the directory containing the DPDK libraries. This helps the system locate the DPDK shared libraries at runtime.

    soc# export LD_LIBRARY_PATH=$INSTALL_DIR/lib64:$LD_LIBRARY_PATH
    Creates a shell script named init_ovs.sh in the package root directory. This adds a command to the script for setting the DPDK_DIR environment variable when executed.
    soc# echo "export DPDK_DIR=$DPDK_DIR" > /opt/ipu_workload_ovs/src/init_ovs.sh
  8. Install the OVS with the DPDK.
    soc# cd $OVS_INSTALL_DIR
    soc# cd ipu_ovs
    soc# ./boot.sh
    soc# ./configure --with-dpdk=static CFLAGS="-O3 -march=native -msse4.2 \
    -mpopcnt -DALLOW_EXPERIMENTAL_API"
    soc# make
    soc# echo "export PATH=\$PATH:$PWD/utilities" >> /opt/ipu_workload_ovs/src/init_ovs.sh
    soc# echo "export OVS_DIR=${PWD}" >> /opt/ipu_workload_ovs/src/init_ovs.sh
  9. Compile management tools
    soc# cd $OVS_INSTALL_DIR
    soc# cd ipu_mngmt_ovs/software/csc_mgmt_tools/src
    soc# make all
    soc# echo "export PATH=\$PATH:$PWD" >> /opt/ipu_workload_ovs/src/init_ovs.sh
    
    soc# cd $OVS_INSTALL_DIR
    soc# cd ipu_mngmt_ovs/software/management-nov1126
    soc# CFLAGS="-fcommon"  make all
    soc# echo "export PATH=\$PATH:$PWD" >> /opt/ipu_workload_ovs/src/init_ovs.sh